You are on page 1of 2

University of Virginia cs3102: Theory of Computation 8 September 2021

Week 2: Counting Past Infinity


Response by: Ryan Robinson (rpr6at)

The problems are designed to develop your skills with formal set cardinalities and how they relate to
functions, provide some practice with inductive reasoning, and get you acquainted with your cohort-
mates.

Collaboration: You should work on the problems yourself, before discussing with others,
and with your cohorts are your cohort meeting. By the Assessed Cohort Meeting, you and
all of your cohortmates, should be prepared to present and discuss solutions to all of the
assigned problems. In addition to discussing with your cohortmates, you may discuss
the problems with any other current CS3102 students you want, and use any resources
you want except for any materials from previous offerings of this course or complete
solutions that might be available on the web, which are not permitted. At the end of
your assessed cohort meeting, your Cohort Coach will assign one of these problems
as a writeup. You may not collaborate on this writeup with your cohort-mates, but
you may use notes taken before or during your assessed cohort meeting.
cs3102 Fall 2021 2 Week 2: Counting Past Infinity

Problem 1: Cohortommendations

Problem 2: Infinite Dominoes

Problem 3: Cantor’s Proof

Problem 4: MAJ,NOT,1 equals AON (based on Exercise 3.6 in TCS book)

In order to prove that MAJ, NOT, 1 is equal to AON, we need to implement MAJ, NOT, 1 with AON and
vice versa. An AND gate constructed with MAJ, NOT, 1 looks like:

M AJ(a, b, N OT (1))

where a and b are the input bits. An OR gate constructed with MAJ, NOT, 1 looks like:

M AJ(a, b, 1))

where again a and b are the input bits. The NOT operator is the same for both computational methods.
Now, to prove they are equivalent, we have to go the other way around. As shown in lecture, a MAJ
function implemented with AON can be implemented like this:
def MAJ(a,b,c)
first_two = AND(a,b)
last_two = AND(b,c)
first_last = AND(a,c)
temp = OR(first_two, first_last)
return OR(temp, last_two)

A ONE function can be implemented like this:


def ONE(a,b)
not_a = NOT(a)
return OR(a, not_a)

As said before, the NOT operator is the same for both computational methods.
Problem 5: Straightline Programming

Problem 6: Nate’s Omission

Creative Commons BY-NC 4.0 Nathan Brunelle

You might also like