Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2008-03-18 23:53:12

chetah
Member
Registered: 2008-02-15
Posts: 32

Discrete Maths

How many bytes contain
a. exactly two 1's
b. exactly four 1's
c. exactly six 1's
d. at least six 1's

Offline

#2 2008-03-19 00:56:46

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Discrete Maths

a)
There are 8 possible places in a byte that your two 1's can go, so the number of ways of arranging them is 8C2 = 28.

b)
Similar to a, but this time the answer is 8C4.

c)
This is the same as asking how many bytes contain exactly two 2 0's. You've already found the answr to that in a).

d)
This is the same as asking how many bytes contain at most two 0's (that is, either no, one or two zeroes). You found the number for two in c), and the other two numbers are easy to find. Add them together to get your answer.


Why did the vector cross the road?
It wanted to be normal.

Offline

#3 2008-03-19 04:01:35

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Discrete Maths

An alternative to (d) is (8C6)*2².  This is because you choose your 6 1's first, and then you have 4 bits to "play with" (i.e. they can either 0 or 1).  There are 4 such possibilities: 00, 01, 10, 11, or rather, 2^2.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#4 2008-03-19 04:27:33

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Discrete Maths

That way counts some bytes more than once.

eg. Two possible bytes are 111111xx and 11111x1x, where the x's are the numbers that you can 'play with'.
Setting the leftmost x in each of those as 1 gets you the same byte, but you're counting it twice.


Why did the vector cross the road?
It wanted to be normal.

Offline

#5 2008-03-19 11:55:03

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Discrete Maths

Making a list also works but takes time
if done by human hand.
Another neat way is to imagine a cube with
8 corners, and draw all the shapes you
can think up.  Then work out all the
rotations and flip-flop mirrors images,
and add everything up to 256 to
check your answer since there are
256 possible bytes.  This exercise
is also helpful in learning all the
3-variable Karnaugh maps in 3-D.


igloo myrtilles fourmis

Offline

Board footer

Powered by FluxBB