Monday, May 24, 2010

What is the max number of combinations using A, B, C, D, E, and F.?

I will give you an example using A, B, and C:


A B C can make A, B, C, AB, AC, BC, and ABC.


AB = BA.


I would like to know the max number of combinations, and if possible(if you have time), all of the combinations. This is not for a homework assignment, I just want to know.

What is the max number of combinations using A, B, C, D, E, and F.?
2^6 - 1 = 63 ways.





Basically, you can either have the letter in the combination or not. So there are two possibilities for each letter. Using the General Counting Principle, you would multiply each of these possibilities, so 2*2*2*2*2*2 = 2^6. However, there is one combination where none of the letters are selected, so that's why you subtract 1.





edit: The above answerer has it now, only in a different way. Rodent, the order doesn't matter, and he wants to know how many ways you select a different number of letters.





Here's the list:





1. A


2. B


3. C


4. D


5. E


6. F


7. AB


8. AC


9. AD


10. AE


11. AF


12. BC


13. BD


14. BE


15. BF


16. CD


17. CE


18. CF


19. DE


20. DF


21. EF


22. ABC


23. ABD


24. ABE


25. ABF


26. ACD


27. ACE


28. ACF


29. ADE


30. ADF


31. AEF


32. BCD


33. BCE


34. BCF


35. BDE


36. BDF


37. BEF


38. CDE


39. CDF


40. CEF


41. DEF


42. ABCD


43. ABCE


44. ABCF


45. ABDE


46. ABDF


47. ABEF


48. ACDE


49. ACDF


50. ACEF


51. ADEF


52. BCDE


53. BCDF


54. BCEF


55. BDEF


56. CDEF


57. ABCDE


58. ABCDF


59. ABCEF


60. ABDEF


61. ACDEF


62. BCDEF


63. ABCDEF
Reply:I know this is a 10 month old "Answer", but how exactly did you look at this, I get 3600 combinations from A,B to F,E,D,C,B,A Report It

Reply:6+5+4+3+2+1= 21





no, no. how 'bout:





6 +6*5/(1*2) + 6*5*4/(1*2*3) +6*5*4*3/(1*2*3*4) +6*5*4*3*2(1*2*3*4*5) +1





6+15+20+15+6+1 = 63
Reply:6! which would be 6*5*4*3*2*1





which is 30*4*3*2


120*3*2


360*2


720?
Reply:AB


AC


AD


AE


AF


BC


BD


BE


BF


CD


CE


CF


DE


DF


A


B


C


D


E


F


ABCDEF


ABC


ABD


ABE


ABF


ACE


ACE


ACF


CDE


CDF


DEF

marguerite

" POINTERS"in C?

Hi! frnds,


can anyone plz. sugest some sites on which i can get to solve some example programs in "POINTERS" in C , and also how to draw the flowchart and algorithm of a pointer program.please help....!!


thank u!

" POINTERS"in C?
See there are no specific sites for this but try some good books ,online www.cplusplus.com .
Reply:My name deepak I am doing Bca and site by site i have teach C language to Bca and Btech student.I have to tell


U because i don't thing that U have go for web site for


Pointer problem.It better to built up Ur confidence because


according to me if anybody want to learn C language(pointer).


First step is that U have more than Two Books at a


time.


Second step never read the theory directly move to program Because u r waisting Ur time in reading theory.


Third daily do only two to three question because if U completed whole exercise in one day u are totally confuse.


Forth Al way do first dry run mean try do solve the question in the copy first.


fifth than make the program.


Sixth always solve the error using top down approach.


seven finally U know the pointers.
Reply:There are no algorithms of "pointer programs" that I know of.





A pointer is basically a description of an address. For instance, and this is a bit contrived, but if you gave someone your house, they would have your house. But if you gave them the ADDRESS of your house, then they could still get the house if they want, but they wouldn't have to carry around the whole house.





Basically pointers are addresses of places in memory, so if you want to pass along a chunk of memory representing the text of a book, you can either pass along the whole text - which might be huge, and time-consuming to pass - or you could just pass the ADDRESS of the text. If the recipient needs to get at the text, it's a small leap once you have the address, and it saves passing all that information around, which chews up resources.
Reply:Hi,





I found the following sites with a very good examples of Pointers using C and C++





http://cis.stvincent.edu/html/tutorials/...





http://www.cs.cf.ac.uk/Dave/C/node10.htm...





http://www.augustcouncil.com/~tgibson/tu...
Reply:Hi,


if u use an under-dos C, maybe code below will explain lot of things to u:





#include %26lt;stdIO.h%26gt;


#include %26lt;conStrea.h%26gt;





#pragma hdrstop





int add1(int* a, int* b)


{


return *a + *b;


}





int add2(int%26amp; a, int%26amp; b)


{


return a + b;


}





constream c;





void main()


{


int a, b;


a = 1;


b = 6;


c.clrscr();


c %26lt;%26lt; add1(%26amp;a, %26amp;b) %26lt;%26lt; endl;





c %26lt;%26lt; add2(a, b);


getch();


}








HTH,





niccie_11
Reply:Pointers are actually poniting where you r going to save u'r information in c language, thus they cannot be shown on the flowchart or define using algorithm





i used www.borland.com, micrsoft sites to understand how i can use the pointers, the r deficult but if u try hard u well be able to understand them easily,


In C program how do i do this?

Use the following structure to set up a dictionary:





struct dictionary


{


char word[10];


char definition[80];


int noun_or_verb; /* 1 for noun 2 for verb */


};





Your dictionary will initially have at least 5 words in it, with room for a maximum of 10 words. You decide on the words and their definitions.





Have the user input a word. Test to see if the word is in the dictionary. If it is in the dictionary, display it to the screen in the following format:





the word - N (for noun) or V (for verb) - definition


For example:


sweat - V - to do C programming homework


If the word is not in the dictionary, ask the user if he/she wishes to add the word to the dictionary. If the user does want to add it to the dictionary, prompt for definition and whether the word is a verb or noun. If the user does not want to put the word in the dictionary do not prompt them for information, simply continue the program.

In C program how do i do this?
Well, first off, you'll need some way to store a bunch of those dictionary entry objects. For simplicity (and because it doesn't sound like this assignment is about hash tables), I'd suggest using a linked list. e.g.





struct DictionaryEntry {....};





struct DictionaryNode {


struct DictionaryEntry entry;


struct DictionaryNode *next;


};





struct Dictionary {


struct DictionaryNode *first;


}





(Note that my terminology is slightly different than yours - my Dictionary struct means the whole thing, whereas DictionaryEntry is a specific item).





Then write some functions to find words in the dictionary and to add new ones. If you were using C++ this would be slightly simpler, but it's good to know how to use malloc...





void addDictionaryEntry( struct Dictionary *dict, struct DictionaryEntry *entry ) {


struct DictionaryNode *node = malloc(sizeof(DictionaryNode));


memcpy( node-%26gt;entry.word, entry-%26gt;word, 10 );


memcpy( node-%26gt;entry.definition, entry-%26gt;word, 80 );


node-%26gt;entry.noun_or_verb = entry-%26gt;noun_or_verb;


node-%26gt;next = dict-%26gt;first;


dict-%26gt;first = node;


}





struct DictionaryEntry *getDictionaryEntryByWord( struct Dictionary *dict, char *word ) {


DictionaryNode *node = dict-%26gt;first;


while( node ) {


if( strcmp(node-%26gt;entry.word, word) == 0 ) {


return %26amp;node-%26gt;entry;


}


node = node-%26gt;next;


}


return null;


}





void initDictionary( struct Dictionary *dict ) {


dict-%26gt;first = 0;


}





// might want a dictionary destructor, too...





That should take care of the storage, which, this being C, is probably the trickiest part. Then you just have to have a decent main() and do the user I/O.





int main( int argc, char **argv ) {


struct Dictionary dict;


struct DictionaryEntry inputEntry;


struct DictionaryEntry *foundEntry;





initDictionary( %26amp;dict );


while( true ) {


printf("Enter a word%26gt; ");


scanf("%9s", inputEntry.word); // at most 9 chars, as we need one more for the string-terminating NUL


foundEntry = getDictionaryEntryByWord( %26amp;dict, inputEntry.word );


if( foundEntry ) {


// tell user about the word


} else {


// ask him if he wants to enter a new word, put the def


// in inputEntry, and addDictionaryEntry it.


}


}


}





I'll leave a few parts for you to fill in, as you probably already know how to make the UI code, but it is rather tedious to type in this text entry area. My code probably has a few syntax errors that'll need fixing, anyway ;)

tropical flowers

What does "s.c." mean behind a law firm's title?

for example: hupy and abraham, s.c.


what does the s.c. stand for?

What does "s.c." mean behind a law firm's title?
Senior Council or Senior councillor


What is the third century B.C?

I find it confusing when historians date something as __ century B.C. Because the smaller the number, the more recent, is for example the first century B.C The year B.C, or way back?

What is the third century B.C?
3rd century BC would be any year between 201 and 300 BC.





1st century BC is 1 - 100


2nd century BC is 101 - 200
Reply:A.D. means Anno Domini (the year of the Lord). B.C. means Before Christ.





2007 A.D. is 2007 years after the death of Jesus.


200 B.C. is 200 years before.


If you go further back in time, the numbers get larger. For example, 1000 B.C. is longer ago than 200 B.C., more years before Christ.
Reply:The larger the number the farthur back it was, so the 3rd century BC is farthur back in history than the 2nd.
Reply:The BC is Before Christian era so 1BC is 1 year before Christ, 5 BC is 5 years before %26amp; 100 BC is 100 years before Christ .


Not everyone uses this calendar (the Chinese don't, they use the Buddhist era calendar) but the Western world uses the BC (before Christ) and AD After his Death for marking the years.
Reply:Just think of it as a negative number, like -18. The further back on the time line you go, with the beginning of the Christian Era as 0 then before that would be the negative side. 18 B.C. would be like -18


If a^2 + b^ 2 + c^2 = abc...?

I know how to prove this. I just think the proof is interesting. If math is your forte, see if you can work it out...





Given three positive integers a, b, and c such that a^2 + b^2 + c^2 = abc. The number of solutions is infinite; for example, a = 3, b = 6, c = 15 is one. However, prove that for every solution, a, b, and c must all be divisible by 3.

If a^2 + b^ 2 + c^2 = abc...?
I see a way to solve this by breaking it up into cases and looking at the equation modulo 3. Suppose a,b, and c are not all divisible by three. Note that a number d not divisible by 3 must satisfy d^2 = 1 mod 3. There are two cases:





1) All three a,b, and c are not divisible by three. Then when you reduce mod 3 you get:





a^2 +b^2 +c^2 = 1+1+1 = 0 mod 3. However, abc is not 0 mod 3 since none of a,b, or c is divisible by 3.





2) At least one of a,b, or c is divisible by 3. Then once again reducing mod 3:





a^2 + b^2 + c^2 = either 1 or 2 mod 3. However abc = 0 mod 3 since one of the three is divisible by 3.





Thus both of the above cases lead to a contradiction, and so all of a, b, and c must be divisible by three.
Reply:Well, look at the squares mod 3. 0 and 1 are possible squares; 2 is not.





Given that, let us examine each of the possible cases for what the LHS is congruent to mod 3.





If it's congruent to 1, it is the sum of a 1 and 2 0s. But this means the RHS must be congruent to 0 mod 3. Contradiction.





A similar argument shows it cannot be congruent to 2. So it is congruent to 0. So the RHS is congruent to 0 too. So at least one of a, b, or c is divisible by 3; i.e., at least one of the terms on the LHS is congruent to 0. But the only way this can happen is if they all are.





QED.


C&A Rules???

Okay..... I'm BORED!!!





So I'm gonna ask this:





What do you think are some rules that all C%26amp;A users should follow?? Or things that they should all know?? Or words that they should know?? (aka fangirl speak- I know you wanna put it in =_=)





I'll give you an example: everyone should know that C%26amp;A stands for Comics and Animation!!!





Stuff like that :3





Get those rusted, cob-web covered gears in your could-be creative brain to work!!! xD





Anime Q:


What is an anime character that you think should be banned from having fans??





Star this people!!! If you don't I might have to get my "fun" box out *glare*...... jkjk xD

C%26amp;A Rules???
Anime Q- Misa fom Death Note..she is such a pain...keeps on going Light- kun Light-kun





some rules C%26amp;A ppl should follow


- ask anime related random questions


- not give the trolls oppurtunity to delete their questions


-eliminate trolls
Reply:- For safety purposes, anti-anime people should never ever set foot here!!!! And should never ever post questions that are meant to insult anime!!!





Like Isabelle said, we are all armed here, so anime haters scram!!!





- People should know where to put their questions.


I see a LOT of questions that are not related to C%26amp;A at all!!! Y!A should monitor that, and people should too!!!





- People should treat their contacts nicely and add contacts because so, not because that.





- People should NOT call anime stuff as anime junks. They're anime TREASURES.











I can't think of much yet. Funny when my brain doesn't work as much as it used to...Maybe I'll come back if I come up with something.
Reply:What do you think are some rules that all C%26amp;A users should follow?? Or things that they should all know?? Or words that they should know?? (aka fangirl speak- I know you wanna put it in =_=)


C%26amp;A isn't the right place to speak about comedians or movies!!!! (I've seen so many people asking about comedians and movies downloads!) and the trolls should be vanished!!! YEAH %26gt;:D





Anime Q:


What is an anime character that you think should be banned from having fans??


Echizen Ryoma----%26gt; Prince Of Tennis


sorry, Ryoma fangirls, I just hate him, he's the most annoying character %26gt;no offense%26lt;
Reply:An answer to your anime q.. I'd say Sasuke..%26gt;.%26gt;


We should follow the rules of...having no rules :D :D or...all C%26amp;A users should know that C%26amp;A is the best category there is! :}
Reply:We should love love and love anime(to death xD) Im joking about the death but if we are C%26amp;A users we should do that =] We should support each other about all the things that are related to anime(I just cant forget to notice it) ;] And anime fans should predominate the world xD xD xD


About the question:Hm...I think maybe-Sasuke-I like him but Sakura with that"Sasuke-kun,Sasuke-kun..." grrrrr she is really freaking me out =] and that`s what I can think of (for now)=]
Reply:Anime Q- Sasuke... -_-





Okay!





Um.......... *thinks*


What they should know:


1. Chu4Lyfe = BOY





2.DarthRaider is not one to be annoyed... T_T He'll rip out your intestines.





3. We are all armed.





4. Step wrong, get blown up.





5. I call fangirl speak Tally language= anone, ne, onegai, yosh! Everyone has to know what Yosh! means.


RULES:





1. Must not like Anime: must LOVE IT!





2. Must not insult randomness





3. Must not show people pictures they do not want to see! *cough Syd cough*





4. MUST ANSWER FUN RANDOM QUESTIONS!





Brain is bursting.





[edit] Just tell her about the Deidara yuri.





DUH I WAS BORED! MY HOUSE IS DULL!!!


And that... *points up* was pretty pathetic... not up to my normal standards.
Reply:I starred you, I starred you! *cowers in corner with banishing gun in hand*








I would like to see us all respect each other, each other's answers, not diss our put each other's favorite anime down, not say anything like "anime is dumb" and like that. I think we all pretty much do that anyway and it's only when a troll comes through or another user that comes on and says the question asker is stupid because she likes Sasuke or whoever. just respect each other.





Yes, we ALL should KNOW %26amp; A stands for Comics %26amp; Animation. That should be a given. A basic requirement.





I don't like Sasuke, Kagome, Kikyo, Keiko. But this goes back to what I said above about respecting each other's likes. On the other hand, some of you may hate Sanzo *still has banishing gun in hand*
Reply:I've got an obvious rule.


All C %26amp; A users MUST love cartoons,and never make fun of them.





Anime character that should be banned from having fans? i'll come back to this later.
Reply:anime q ~ aizen





if u want to get stabbed, go to stabby

sound cards