
Dec 31st, 2015, 05:14 PM
#1
Thread Starter
New Member
Hey, need some help with combinations and possibilities please
Hello,
First of all, happy holidays and a happy new year to you all
i had a different nick name here long time ago, i couldn't remember it so i opened a new one.
im having some issues with combinations and possibilities,
I'll try to explain myself (and there is a photo attached)
I'm having a Checkbox's table with 16 rows and 3 columns, on each row of that 16 rows there can be only one selection for each row. so i needed a way to calculate my possibilities.
I did 16^3*3 gave me the result of 12,288 possible combinations (in case that i was right with my calculation)
if its true, that means that i have 12,288 different table combinations for that 16 rows and 3 columns table.
i need something that can show me all those combinations, don't care if it will be in excel or VB or combine.
i tried to google and work on it for couple of days but no success.
i managed to find out how to show me the possibilities, but some of it or part of it wasn't what im looking for because it didn't really show me the possible combinations it just show me what happen if you mix all letters.
i don't mind if it will be a Binary way or Excel or VB way, i just can find a way to show me all options.
it doesn't have to be like in the photo where its 1, X, 2
even
001
010
100
that way the 1 will mean a checkbox so everywhere there is 1, that mean to mark that checkbox.
hopefully you guys get me, and hopefully i explained it well.
thanks for your time and help!
wish you all happy holiday and a happy new year
Attached:

Dec 31st, 2015, 09:53 PM
#2
Re: Hey, need some help with combinations and possibilities please
Welcome to the forum. As you noted, your first thread took a time to post, which is largely due to antispam measures. I deleted the second thread because it appeared to be a complete duplicate of the first, though with a different organization. I felt that this was the better of the two. If there was something extra in the second one, let me know.
As to the question, I think your permutations are off. For each row, there can be one of three possibilities, so if you had one row, there would be three combinations. For two rows, there would be three combinations for each of the first three. So, for one row there are 3^1 possibilities and for two rows there are 3^2 possibilities, so I believe you will have 3^16 possibilities for your scenario, which is a bit over 43 million.
Search the forum on the word Permutations. I seem to remember that somebody posted a permutation calculator within the last month. It might be in the CodeBank.
My usual boring signature: Nothing

Jan 1st, 2016, 08:06 AM
#3
Hyperactive Member
Re: Hey, need some help with combinations and possibilities please
Happy New Year
Shaggy is right about the permutations.
I don't know, but I don't think you really want to "see" all 43 million!!!
I was lazy and did not check out the CodeBank.
I feel I may have missed something,but the following
Code:
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim a, b, c, d As Integer
Dim astring As String = ""
For a = 0 To 2
For b = 0 To 2
astring += a.ToString + b.ToString + " "
Next
Next
MsgBox(astring)
End Sub
will do what you want. WARNING there may be better and/or faster ways to do it!!!
This was quick and dirty.
In my example you will add nested loop until you have sixteen.
The line [ astring += a.ToString + b.ToString + " " ] will go in the inner most loop.
George
Last edited by georgesutfin; Jan 1st, 2016 at 08:14 AM.
Reason: typo and clarification

Jan 3rd, 2016, 03:17 AM
#4
Thread Starter
New Member
Re: Hey, need some help with combinations and possibilities please
Originally Posted by Shaggy Hiker
Welcome to the forum. As you noted, your first thread took a time to post, which is largely due to antispam measures. I deleted the second thread because it appeared to be a complete duplicate of the first, though with a different organization. I felt that this was the better of the two. If there was something extra in the second one, let me know.
As to the question, I think your permutations are off. For each row, there can be one of three possibilities, so if you had one row, there would be three combinations. For two rows, there would be three combinations for each of the first three. So, for one row there are 3^1 possibilities and for two rows there are 3^2 possibilities, so I believe you will have 3^16 possibilities for your scenario, which is a bit over 43 million.
Search the forum on the word Permutations. I seem to remember that somebody posted a permutation calculator within the last month. It might be in the CodeBank.
Well thank you for taking the time to read and choose whats better
i was thinking it would be 16^3, that's the only one i think that make sense haha
i mean, there is only 16 rows and 3 columns per a row, is it reasonable that it will have 43 million combinations? i mean, the lottery odds are 268 million and there is 75 numbers there lol
but im guessing that if you say, you probably know better than me
ill try to get rid of some rows, but i do need something that will show me all combinations
ill try to take a look in the CodeBank, thank you
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

Click Here to Expand Forum to Full Width
