Results 1 to 20 of 41

Thread: Homework

Hybrid View

  1. #1
    Community Member
    Join Date
    Jan 2012
    Posts
    4,643

    Default Homework

    Sets and Tuples.

    They are different, right?

    I mean, the elements in a set are not ordered, and the elements in a tuple are ordered.


    - - - - - - - Sets - - - - - - - - - - - - - - - - Tuples - - - - - - -
    {1, 2, 3, 4} = {1, 3, 2, 4} but (1, 2, 3, 4) <> (1, 3, 2, 4)

    So, if I am presented with a group of sets, curly braces and all, and asked which are ordered sets, my answer is none, right?

    Since by definition, sets are unordered.

    Or did I miss something?
    Last edited by Tscheuss; 07-19-2013 at 02:59 AM.
    http://myaccount.turbine.com

    Je ne suis pas
    DDO Alpha Tester

  2. #2
    Community Member
    Join Date
    Jan 2012
    Posts
    4,643

    Lightbulb

    While looking at how set theory ties in with relational databases, I realized that the columns in tables are sets. Yeah, I know. Most of you are looking at me like I said water is wet, but this is something new to me. I was looking at the obvious, that a record was a set of related fields, and a table is a set of related records. Then I fixed on the word 'related'. Each column is a set of items of the same type. A set of last names, a set of ID numbers, a set of birthdays, etc.

    When I cross all of these sets (columns) in a table, I get a Cartesian product that is the set of all ordered combinations of these sets. Every record is an element of, and a subset of, said Cartesian product, and a subset of a Cartesian product is called a relation.

    Enough homework for now; my head is starting to hurt.
    http://myaccount.turbine.com

    Je ne suis pas
    DDO Alpha Tester

  3. #3
    2015 DDO Players Council Hazelnut's Avatar
    Join Date
    Jul 2013
    Location
    Canada, EST
    Posts
    888

    Default

    Quote Originally Posted by Tscheuss View Post
    While looking at how set theory ties in with relational databases, I realized that the columns in tables are sets. Yeah, I know. Most of you are looking at me like I said water is wet, but this is something new to me. I was looking at the obvious, that a record was a set of related fields, and a table is a set of related records. Then I fixed on the word 'related'. Each column is a set of items of the same type. A set of last names, a set of ID numbers, a set of birthdays, etc.

    When I cross all of these sets (columns) in a table, I get a Cartesian product that is the set of all ordered combinations of these sets. Every record is an element of, and a subset of, said Cartesian product, and a subset of a Cartesian product is called a relation.

    Enough homework for now; my head is starting to hurt.
    You expect me to remember stuff I studied 20 years ago? Do I look like a university professor to you?

    Thanks! I've been wanting to use the rolleyes smilie for ages.
    Zyinniah Hazelnut and Curissa Hazelnut on most servers.

  4. #4
    Community Member
    Join Date
    Jan 2012
    Posts
    4,643

    Default

    Quote Originally Posted by Hazelnut View Post
    You expect me to remember stuff I studied 20 years ago? Do I look like a university professor to you?

    Thanks! I've been wanting to use the rolleyes smilie for ages.
    20 years ago?!? Why, that means you're... erm... let's see...
    carry the 3?

    *takes off socks

    Um, maybe I should just forget the math. I mean, I mustn't get distracted from my homework.

    Yeah, that's it. I need to go do my homework.
    http://myaccount.turbine.com

    Je ne suis pas
    DDO Alpha Tester

  5. #5
    Community Member
    Join Date
    Jan 2012
    Posts
    4,643

    Default Java? But I don't like coffee.

    Okay. I got the hang of objects in general, and classes. I know they are the same, but different. So, classes hold the methods and properties that belong to the objects they represent. Inheritance is simple; we covered that in biology - dog is mammal is vertebrate...

    I need to keep reading to find out why Java doesn't have multiple inheritance, while C++ does.

    I'm not sure about the next chapter, though. It's about polymorphism.

    I'm pretty sure that is still illegal in some states.
    http://myaccount.turbine.com

    Je ne suis pas
    DDO Alpha Tester

  6. #6
    Founder & Hero cdbd3rd's Avatar
    Join Date
    Jan 2006
    Location
    Escaping Mizzery in the Tavern Attic.
    Posts
    22,586

    Default

    Quote Originally Posted by Tscheuss View Post

    I need to keep reading to find out why Java doesn't have multiple inheritance, while C++ does.

    I'm not sure about the next chapter, though. It's about polymorphism.

    I'm pretty sure that is still illegal in some states.

    Java question: http://javapapers.com/core-java/why-...orted-in-java/


    Polymorphism = illegal only if you get caught.
    CEO - Cupcake's Muskateers, Thelanis
    DDO Freebies ____ Monster Manual


  7. #7
    2015 DDO Players Council Hazelnut's Avatar
    Join Date
    Jul 2013
    Location
    Canada, EST
    Posts
    888

    Default This one I can answer.

    Quote Originally Posted by Tscheuss View Post
    Okay. I got the hang of objects in general, and classes. I know they are the same, but different. So, classes hold the methods and properties that belong to the objects they represent. Inheritance is simple; we covered that in biology - dog is mammal is vertebrate...
    A class is a definition of something that doesn't exist yet. An object is the existence of the thing that is defined by a class. Does that make sense?

    Quote Originally Posted by Tscheuss View Post
    I need to keep reading to find out why Java doesn't have multiple inheritance, while C++ does.
    Because Java is broken, badly broken.

    Quote Originally Posted by Tscheuss View Post
    I'm not sure about the next chapter, though. It's about polymorphism.

    I'm pretty sure that is still illegal in some states.
    Yes. It should be illegal globally.

    Once upon a time, a programmer wrote everything in machine language (ya, binary). Then they got lazy and created this thing called automatic programming which later got renamed to assembly language (no, I'm not kidding). Then they got sick of repeating bits of assembly and created macro assembly. Then some bright guys decided to bundle together a bunch of macros to make things even easier and called it "B" (really). "B" was okay but they wanted it to go a bit further, so they added some more complexity to the "macros" and called their new language "C". Then things started to get weird.
    Zyinniah Hazelnut and Curissa Hazelnut on most servers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

This form's session has expired. You need to reload the page.

Reload