18.310 Exam 2
You have 50 minutes to complete this exam.
One 8.5 x 11 sheet of notes allowed. No calculators allowed.
A correct answer does not guarantee full credit and a wrong answer does not
guarantee loss of credit. You should concisely indicate
18.310 Homework # 4
1: Write a one to two page essay explaining Shannons rst and second theorems
(coding for eciency and coding for error correction). What do they have in common?
There should be a brief introduction, and it should b e typeset or word pro
18.310 Homework # 8
1a: Suppose that you have a necklace of length 15, and three colors of b eads. How
many dierent patterns are there for stringing the b eads on the necklace?
1b: Suppose that you use ve beads each of the colors green, blue, and yellow?
18.310 Homework # 3
1a: For the relative frequency assignment
A
C
E
H
.10 .07 .03 .05
I
MT
.07 .22 .16
S
.30
what does Shannons entropy formula give us for the minimum number of bits p er
letter required to compress this message?
1b: For the ab ove freque
18.310 Homework # 5
1: Consider the following polynomials
i) 1 + x + x2 + x4 + x6
ii) 1 + x2 + x6
iii) 1 + x + x5 + x7
iv) 1 + x + x3 + x5 + x7
v) 1 + x + x2 + x5 + x7
1a: You should be able to tell that two of these are not primitive without using a
spre
18.310 Homework # 10
1a. On a spreadsheet, implement the simplex algorithm for the linear program
maximize 2x + y + 4z
subject to
x + 2y z 4
x
+z3
2x + y + 3z 5
and x > 0, y > 0 and z > 0. Perform pivots until you nd the optimum.
1b. From the tableau obta
18.310 Homework # 7
1: Write an essay giving Kempes false proof of the four-color theorem, and explaining
what the aw in it is. Equations should either b e typeset in LaTex or composed using
an equation editor or with other mathematical typesetting softwa
18.310 Assignment 1:
1) Verify that one can have a good non-adaptive 3 weighing scheme with no good coin
for each of 9 through 13 coins; by producing a three-row matrix having each number of
columns, obeying the conditions that each row sums to 0, and no
Exam #1 Study Questions 1. Weighing - Suppose you do a two outcome experiment, like weighing, in which the outcomes are
balance and unbalance, and your machine can give one false r eading. How many weighings do you need
to distinguish among 16 coins exact
Study Questions for Exam 2
1. Finding Primes - Describe a reasonably efficient way to find 100 decimal digit
primes.
2. Raising to a Power - Describes an efficient way to raise a number, x, to a high
power, y, mod a large number z , which, if y is divis
18.310 Exam #2: Take Home Part
Problem 1. 25 points
Write a spreadsheet that, for an input number N of up to 2,000,000, will find a prime (if one exists) in the
numbers between N and N + 100. As usual, inputs and outputs should be clearly marked. It shoul
18.310 Exam 2 Take-Home
Problem 1: RSA (10 points)
The received message r = 1598936 is intercepted and you want to break the code. The
RSA code used: message m is raised to the power M (Mod N ), where M = 125879
and N = 2044459, so r = mM Mod N . Retrieve
18.310 Homework # 9
1: Set up a spreadsheet that does the FFT for N = 16. Make your calculations mod a
prime p that posesses a primitive 16th root of 1. Make sure the cells where the input
sequence is entered are clearly marked. Take the FFT of the output
18.310 Exam #1: Take Home Part
Problem 1. 10 points
Find a primitive polynomial p(x) of degree 6 which is not 1 + x + x6, and construct its remainder
table.
Problem 2. 10 points
Find the polynomial p3(x) associated with the polynomial you chose in problem
18.310 Homework Assignment #6:
1. Choose two primes P and Q between 1000 and 2000. (They are chosen this size so that multiplying two
numbers less than N = PQ doesn't overflow your spreadsheet arithmetic. Find them any way you want.)
Construct an RSA enco
18.310 Exam #1
1. Given N coins of which all have the same weight and at most one which has a different weight. You want
to locate the different weight coin or declare that all the coins are the same weight, using a balance at most
k times. How large can
18.310 Exam 1 - Take Home Part
Problem 1 (20 points)
A) Find a prime polynomial of degree 7.
B) Construct a 2 error correction code.
C) Construct a 3 error correction code.
We only want the encoder. Your encoder for 2 errors Problem 1(B) will be
used for
18.310 Assignment 2:
Problem 1
Choose one of the sorting methods described in class (but not inse rtion sort) and write a one page essay explaining
it. There should be a brief introduction. The sorting method shoul d be described in enough detail to let a