Distinct patterns

Zelda22

Junior Member
Joined
Mar 30, 2022
Messages
136
There is a strip of five squares.

Each square may be colored either black or white.

How many distinct patterns can be created in this way?

I don't know how to solve this question. :(
I tried different ways, but I don't think any is correct.

Attempt 1

5! * 2! = 240

Attempt 2
(using permutations)

5 B + 0 W = 1
4 B + 1 W= 120
3 B + 2 W = 60
2 B + 3 W = 20
1 B + 4 W = 5
0 B + 5 W = 1

1 + 120 + 60 + 20 + 5 + 1 = 207


Attempt 3

Since there are two alternatives black or white, and 5 squares

2^5= 32 black
2^5= 32 white

but then, I don't know what to do next.

32 * 32 = 1024 ?

Please help.
 
What if you had only 2 squares? How about 3? Can you see a pattern?
 
I don't know what bit-strings is :(
In computer science a bit string is any finite string of [imath]0's\text{ or }1's[/imath] All information is encoded with them.
But it could be any binary string: boy/girl, occupied/unoccupied, off/on, up/down or black/white squares.
 
In computer science a bit string is any finite string of [imath]0's\text{ or }1's[/imath] All information is encoded with them.
But it could be any binary string: boy/girl, occupied/unoccupied, off/on, up/down or black/white squares.
Thank you. I didn't learn that at school yet (5th grade)

So there are 2 bit strings, (two alternatives) and 5 squares, so 2^5=32 (Product rule)
 
Attempt 2
(using permutations)

5 B + 0 W = 1
4 B + 1 W= 120
3 B + 2 W = 60
2 B + 3 W = 20
1 B + 4 W = 5
0 B + 5 W = 1

1 + 120 + 60 + 20 + 5 + 1 = 207
Why would the number of ways of getting 4B & 1W be different than 4W & 1B????
Why would the number of ways of getting 3B & 2W be different than 3W & 2B????
 
Why would the number of ways of getting 4B & 1W be different than 4W & 1B????
Why would the number of ways of getting 3B & 2W be different than 3W & 2B????
shouldn't be, right? I made a mistake I calculated 5P4 and then 5P1, I see why is wrong. thanks.
 
Top