Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Math Problem
Index -> Off Topic
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cycro1234




PostPosted: Thu Feb 17, 2005 10:57 pm   Post subject: Math Problem

Hey all.

I got a math problem from school and I can't seem to figure it out. Any help would be appreciated Smile

The 1337 H0t D0g P4l4c3 announces that a customer can order a 1337 h0t d0g with or without any of the following toppings: ketchup, mustard, mayonnaise, lettuce, tomato, onion, pickle, cheese, or hot peppers. How many different h0t d0g orders are possible?

An explanation would help as well. Thanks in advance.
Sponsor
Sponsor
Sponsor
sponsor
Martin




PostPosted: Thu Feb 17, 2005 11:34 pm   Post subject: (No subject)

2^9, or 512 different ways.

You have 9 incredients, each of which can be in one of two states: on the hotdog, or not on the hot dog.

So you have two choices for ketchup, two choices for mustard, and so on.

2 * 2 * 2 * ... * 2 = 2 ^ 9 = 512.

Note that this includes the possibility that there are no ingredients on the hot dog. If that isn't an option (ie. you have to have at least one topping), you subtract the case where they choose nothing (ie (2^ 9) - 1 = 511).

Hope that helps.
cycro1234




PostPosted: Fri Feb 18, 2005 12:15 pm   Post subject: (No subject)

Yeah it does! Thanks a lot Smile
Display posts from previous:   
   Index -> Off Topic
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: