You are on page 1of 5

Discrete Mathematics HW for Gradescope

Submit these problems to Gradescope (HW On Time) if you finish before the deadline, or
Gradescope (HW Late) after the deadline but before the end of the semester. Be sure to do the
MyOpenMath problems too.
12.2
1. Find the sum-of-products expansions of these Boolean functions.

a) F (x, y, z) = x + y + z

b) F (x, y, z) = (x + z)y

c) F (x, y, z) = x

d) F (x, y, z) = xy

2. Find the sum-of-products expansions of the Boolean function F (x, y, z) that equals 1 if and only if

a) x = 0.

b) xy = 0.

c) x + y = 0.

d) xyz = 0.

12.3

1. Construct circuits from inverters, AND gates, and OR gates to produce these outputs.

a) x + y

b) (x + y)x

c) xyz + x y z

d) (x + z)(y + z)

2. Consider the four two-bit integers (00)2 , (01)2 , (10)2 , (11)2 , or 0, 1, 2, 3. Your job is to construct a
circuit using AND, OR and NOT gates that takes two two-bit integers, (x1 x0 )2 and (y1 y0 )2 and returns 1 if
(x1 x0 )2 > (y1 y0 )2 and 0 otherwise. E.g. If x1 = 1, x0 = 0, y1 = 0, y0 = 1, then (x1 x0 )2 = (10)2 = 2 and
(y1 y0 )2 = (01)2 = 1. Since 2 > 1, your circuit would output a 1 in this instance.
12.3 (continued)
3. A multiplexer takes a number of different incoming inputs and depending how the control bits are set,
passes one of inputs through to the output.
A one bit multiplexer has two possible inputs that could be passed through (x0 and x1 ) and one control bit c0 .
If c0 = 0, then the output of the circuit is the value of x0 . If c0 = 1, then the output of the circuit is x1 .
A two bit multiplexer has four possible inputs that could be passed through (x0 , x1 , x2 , and x3 ) and two control
bits (c0 and c1 ). If the control bits are set so that c0 = 1, c1 = 0, then since (c0 c1 )2 = (10)2 = 2, x2 ’s output would
be passed through.

Using AND, OR and NOT gates,


a) design a 1 bit multiplexer.
b) design a 2 bit multiplexer.

12.4
1. For each of the following, determine which sum-of-products expression generated the K-map, use the K-
map to simplify the expression to one equivalent to the original expression, and simplify again using the Quine-
McCluskey method. of these K-maps.

a) y y
x 1
x 1 1

b) y y
x 1 1
x

c) y y
x 1
x 1

2. Use a K-map to find a minimal expansion as a Boolean sum of Boolean products of each of these functions
of the Boolean variables x and y. Then find the same expression using the Quine-McCluskey method.

a) xy + x y

b) xy + xy

c) xy + xy + xy + x y
3. Use a K-map to find a minimal expansion as a Boolean sum of Boolean products of each of these functions
in the variables x, y, and z. Then find the same expression using the Quine-McCluskey method.

a) xyz + x yz

b) xyz + xyz + xyz + xyz

c) xyz + xyz + xy z + xyz + x yz

d) xyz + xyz + xy z + xyz + xyz + x y z

13.2
1. Construct a finite-state machine that delays an input string by two bits, giving 00 as the first two bits of
output. E.g The input string 110001111... produces the output 001100011...

2. Construct a finite-state machine that gives an output of 1 if the number of input symbols read so far is
divisible by 3 and an output of 0 otherwise.

3. Construct a finite-state machine that outputs 1 if the input string has a 1 in the last position and a 0 in the
third to the last position read so far, 0 otherwise.
In other words, the machine outputs a 1 if the last three bits of the string so far match the pattern 0x1, and 0 if
not.

13.3
1. Construct a deterministic finite-state automaton that recognizes the set of all bit strings that end with 10.

2. Construct a deterministic finite-state automaton that recognizes the set of all bit strings that do not contain
three consecutive 0s.

3. Construct a deterministic finite-state automaton that recognizes the set of all bit strings that begin with 0 or
end with 11.

13.4
1. Express each of these sets using a regular expression and as a finite state automaton.

a) the set containing all strings with zero, one, or two bits

b) the set of strings of two 0s, followed by zero or more 1s, and ending with a 0

c) the set of strings with every 1 followed by two 0s

d) the set of strings ending in 00 and not containing 11

e) the set of strings containing an even number of 1s


13.4 (continued)

2. For each regular expression, find a finite-state automaton that accepts exactly those strings matched by the
expression.

a) 01

b) (0 ∪ 1)1


c) 00(1 ∪ 10)

3.
For each of the below, find the regular expression that matches exactly those bit strings accepted by the Finite
State Automaton.
a)
S1
0,1

start S0 0,1

0,1
S2

b)
S1
0,1

start S0 0,1

0,1
S2

c)
1 0
0,1
0 1
start S0 S1 S2 S3 1
0

1.3 (part 2)
1. Use logical equivalences to show

a) p → (p ∨ q) is a tautology.

b) (p ∧ q) → (p → q) is a tautology

c) p → q and ¬q → ¬p are logically equivalent.

d) (p → q) ∧ (p → r) and p → (q ∧ r) are logically equivalent.


1.6

1. For each of the following, determine whether it is a valid or invalid argument. If it is valid, use logical
equivalences and the rules of inference to show this. If it is invalid, find a truth assignment that makes the
premises true and the conclusion false.

p→q p p→r
¬q → p (p ∨ q) → r q→r
∴q ∴r ∴r

1.7
1. Give a direct proof of each of the following:
2
a) If n is even, then n is even.
b) The product of two odd numbers is odd.
c) If n is even, then 3n + 2 is even.
d) If 3n + 2 is even, then n is even.
e) If m + n is even, and n + p is even, then m + p is even.

2. Give a proof by contraposition of each of the following:


2
a) If n is even, then n is even.
b) If mn is even, then m is even or n is even.
c) If n is even, then 3n + 2 is even.
d) If 3n + 2 is even, then n is even.

You might also like