Click here to Skip to main content
15,923,689 members
Home / Discussions / C#
   

C#

 
QuestionSystem Bitmaps Pin
deepscyberpulse2-Feb-06 6:26
deepscyberpulse2-Feb-06 6:26 
AnswerRe: System Bitmaps Pin
malharone2-Feb-06 6:31
malharone2-Feb-06 6:31 
AnswerRe: System Bitmaps Pin
James Gupta2-Feb-06 8:30
professionalJames Gupta2-Feb-06 8:30 
QuestionProblems with VB 6.0 App loading .net assembly with own mdi window (message loop)... Pin
Chris Richner2-Feb-06 6:26
Chris Richner2-Feb-06 6:26 
QuestionSorting? algorithm Pin
criz84262-Feb-06 6:17
criz84262-Feb-06 6:17 
AnswerRe: Sorting? algorithm Pin
Paddy Boyd2-Feb-06 6:26
Paddy Boyd2-Feb-06 6:26 
GeneralRe: Sorting? algorithm Pin
criz84262-Feb-06 6:35
criz84262-Feb-06 6:35 
AnswerRe: Sorting? algorithm Pin
Guffa2-Feb-06 6:44
Guffa2-Feb-06 6:44 
Are there any limitations on the number of items in each group, or can one group have many more items as long as the totals are close?

An easy way to find all combinations is too look at each item belonging to either group as a bit value. If you have 8 items you need 8 bits to represent which group they belong to, so there are 256 (2^8) ways of dividing the items into two groups if there is no limitations on the number of items in each group.

If you place the (rather obvious) limitation that each group has to contain at least one item, you have (2^n)-2 combinations, where n is the number of items.

---
b { font-weight: normal; }


-- modified at 12:44 Thursday 2nd February, 2006
GeneralRe: Sorting? algorithm Pin
criz84262-Feb-06 7:15
criz84262-Feb-06 7:15 
GeneralRe: Sorting? algorithm Pin
Guffa2-Feb-06 10:46
Guffa2-Feb-06 10:46 
GeneralRe: Sorting? algorithm Pin
criz84262-Feb-06 12:26
criz84262-Feb-06 12:26 
AnswerRe: Sorting? algorithm Pin
Guffa2-Feb-06 21:43
Guffa2-Feb-06 21:43 
QuestionHow did the user close the form? Pin
Chals2-Feb-06 4:45
Chals2-Feb-06 4:45 
AnswerRe: How did the user close the form? Pin
malharone2-Feb-06 5:42
malharone2-Feb-06 5:42 
GeneralRe: How did the user close the form? Pin
Chals2-Feb-06 5:45
Chals2-Feb-06 5:45 
GeneralRe: How did the user close the form? Pin
Dave Kreskowiak2-Feb-06 5:48
mveDave Kreskowiak2-Feb-06 5:48 
GeneralRe: How did the user close the form? Pin
Chals2-Feb-06 6:23
Chals2-Feb-06 6:23 
GeneralRe: How did the user close the form? Pin
microsoc2-Feb-06 22:16
microsoc2-Feb-06 22:16 
GeneralRe: How did the user close the form? Pin
Chals6-Feb-06 6:37
Chals6-Feb-06 6:37 
GeneralRe: How did the user close the form? Pin
microsoc6-Feb-06 14:19
microsoc6-Feb-06 14:19 
QuestionUpdating MenuItems (vs2005) Pin
Mark062-Feb-06 4:41
Mark062-Feb-06 4:41 
AnswerRe: Updating MenuItems (vs2005) Pin
Mark062-Feb-06 4:50
Mark062-Feb-06 4:50 
GeneralRe: Updating MenuItems (vs2005) Pin
malharone2-Feb-06 5:43
malharone2-Feb-06 5:43 
QuestionTransparent Color in a Picture Box Pin
MarkMokris2-Feb-06 4:39
MarkMokris2-Feb-06 4:39 
AnswerRe: Transparent Color in a Picture Box Pin
Dave Kreskowiak2-Feb-06 5:47
mveDave Kreskowiak2-Feb-06 5:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.