Course Synthesis 1
Course Synthesis 1
Course Synthesis 1
Problem Points
Short Answer Questions /10
Problem #1 - Days of the Week /8
Problem #2 - Truthies and Falsies /8
Problem #3 - Counting Sets /8
Problem #4 - Facebook Relationships /8
Problem #5 - Rectangle Counting /8
Problem #6 - Combinatorial Formulas /8
Instructions
This Synthesis will be marked out of 50. You are to answer all of the Short Answer Questions, worth
up to 10 marks. For the six Full Solution Problems, attempt as many of them as you wish, but
only your top five will be counted. For example, if you get 7 points on the Short Answer Questions
and your marks on the six Full Solutions Problems are 8, 4, 8, 2, 7, 8, then your grade will be
7+8+4+8+7+8 = 42 out of 50, since your lowest score will be dropped.
Think of this Midterm as a week-long individual take-home exam where you may consult your
notes, the course textbook, anything on the Canvas Page, and any websites linked from the Canvas
Page. However, you may NOT consult your classmates or look at any other online resources unless
explicitly approved by me beforehand. Please post your questions on the Canvas Discussion Forum
if you would like any clarifications or hints.
To make it easier for the TAs, submit one .pdf file with your responses to the Short Answer
Questions, and then individual .pdf files for each of the (full-solution) Problems you attempt.
CS5002, Fall 2024, Timothy Edmunds – Course Synthesis 1 2
Hand in a single .pdf file (ideally one page long) on which you will provide your answers to the 10 ques-
tions below.
All you need to do is submit your final ANSWERS to these 10 questions. No additional work is re-
quired or requested. No justification is required – all I want is your final answer.
Each correct answer will be worth 1 point. For each incorrect answer, the TAs will decide whether
your response will be awarded 0.5 points (for an answer that is almost correct) or 0 points.
(1) We can convert a number from 8-bit Two’s complement to decimal (base 10). For example, 00011101
becomes +29 and 11110110 becomes -10.
(2) We can convert numbers from one base to another. For example, 134 in base 5 equals 62 in base 7.
We write this as (134)5 = (62)7 .
(3) Let x be a variable representing people. Let B(x) be the statement that person x currently lives in
Boston, and let C(x) be the statement that person x currently lives in Canada.
(4) Let A = {1, 2, 3, 4, 5, 6, 7}, B = {3, 4, 5, 6, 7, 8, 9}, and C = {5, 6, 7, 8, 9, 10, 11}. Determine the set
(A ∩ B) − (A ∩ C).
(5) We say that a set S is “happy” if both of these conditions hold: {1,2,3,4} is a subset of S, and S
is a subset of {1,2,3,4,5,6,7,8,9}. For example, S = {1, 2, 3, 4, 7, 9} is happy.
(6) In the Canadian province of Nova Scotia, every car’s license plate is three digits followed by three
letters (570 PZC), or three letters followed by three digits (BTX 043). On any Nova Scotia license
plate, no letter can appear more than once, and no number can appear more than once.
(7) Suppose we were to list out all 120 permutations of ALIGN, and write them in alphabetical order,
starting with the 1st word (AGILN) and ending with the 120th word (NLIGA).
(8) There are 10 identical chocolate bars on a table. Four students agree to divide the chocolates so
that every student gets at least 1 chocolate.
Determine the total number of ways that the 10 chocolates can be distributed among the 4 students
in this way.
If you prefer, here is an equivalent mathematical formulation of this same problem. Determine the
number of ordered sets (a, b, c, d), where a, b, c, d are positive integers for which a + b + c + d = 10.
(9) Consider the 81 cards of the SET deck. Say I select 3 of them at random, all at the same time.
(10) On an earlier Problem Set you showed that if you have a 3 by 7 board, where each cell is coloured
either red or blue, then the board must contain a rectangle or square whose four corner cells are all
the same colour. However, on a 3 by 6 board, this statement is not true.
Consider a 4 by N board, where each cell is coloured either red, blue, or green. Determine the
smallest integer N for which the following statement is true: no matter how the cells are coloured,
the board must contain a rectangle or square whose four corner cells are all the same colour.
You will get the full point for the correct (optimal) value of N , and a half point for a value of
N that is not optimal.
CS5002, Fall 2024, Timothy Edmunds – Course Synthesis 1 4
In this problem, you will determine the day of the week for a famous date in the 20th century.
(a) January 1, 1901 was a Tuesday. Using this piece of information, determine the day of the week for
October 29, 1901. Clearly justify your answer, showing all of the steps in your calculations.
(b) October 29, 1929 was the date of the worst stock market crash in U.S. history. Using your answer
from part (a), determine the day of the week for October 29, 1929. Clearly justify your answer,
showing all of the steps in your calculations.
(c) Jane Doe was born on the 29th day of month M, in the year 1929. She was born on a Thursday.
In a remote village of British Columbia live two groups of people: Truthies and Falsies. Truthies always
make statements that are TRUE, while Falsies always make statements that are FALSE.
You head to this village and meet three people named Ella, Jameson, and Ron.
Your goal is to determine whether each of Ella, Jameson, and Ron are Truthies or Falsies.
(a) Let E be the sentence “Ella is a Truthie”. Similarly define J and R for Jameson and Ron.
Convert this logic puzzle into a single statement S, in Conjunctive Normal Form. Clearly show all
of your steps.
(b) We say that S is satisfiable if at least one row of the Truth Table makes S evaluate to TRUE. Show
that S is indeed satisfiable, and use your answer to solve this logic puzzle.
(c) Consider the following sentence X, which has three variables A, B, and C.
Let |A|, |B|, and |C| be the cardinality of the three sets, respectively.
(a) If there are two sets, the Inclusion-Exclusion Principle tells us that |A ∪ B| = |A| + |B| − |A ∩ B|.
Determine the correct formula for |A ∪ B ∪ C|, and clearly explain why your formula is correct.
(b) Let S be the set of positive integers less than 1000 that contains at least one digit equal to 5.
For example, all of these numbers are in set S: 5, 35, 50, 55, 558, 750, 905. There are many
others.
Determine |S|, the number of elements in set S. Clearly justify your answer.
(c) Let T be the set of positive integers less than 1000 that is divisible by at least one of these three
numbers: 7, 11, 13.
For example, all of these numbers are in set T : 13, 77, 98, 121, 715, 994. There are many others.
Some Northeastern Align students have Facebook accounts. For each pair of students, exactly one of the
following statements is true: “they haven’t met”, “they like each other”, or “they hate each other”.
(a) Suppose there are 17 Aligners on Facebook, and Xiaofei is one of them. Clearly explain why at
least one of these three statements must be true in the 17-vertex Facebook graph: (i) Six people
are friends with Xiaofei; (ii) six people are strangers with Xiaofei; (iii) six people are enemies with
Xiaofei.
(b) If there are 17 Aligners on Facebook, prove that there must exist three people from this group, all
of whom are either mutual strangers, mutual friends, or mutual enemies.
Hint: Set up a Proof by Contradiction. From part (a), you know that X is connected with at least
six people via the same colour. Suppose that this colour is green. Label six of Xiaofei’s friends with
the letters A, B, C, D, E, F. Thus, you know that the lines XA, XB, XC, XD, XE, XF are all green.
Consider the fifteen edges AB, AC, AD, AE, AF, BC, BD, BE, BF, CD, CE, CF, DE, DF, EF. Can
any of these edges be green? If not, then each of these fifteen edges must be coloured either red or
blue. Does this look familiar? Perhaps this is a problem you have solved before!
(c) If there are 9 Aligners on Facebook, show that it is not necessarily true that three people from
this group are either mutual strangers, mutual friends, or mutual enemies. To do this, construct a
graph on 9 vertices, and colour each edge with one of three colours so that there does not exist any
monochromatic triangle, i.e., a triangle with all three edges having the same colour.
To get full marks on part (c), all you have to do is submit the graph. No explanation is needed.
(d) (OPTIONAL BONUS) For an integer N ≥ 10 of your choice, construct a graph on N vertices,
and colour each edge with one of three colours so that there does not exist any monochromatic
triangle, i.e., a triangle with all three edges having the same colour.
In this question, assume that every square is a rectangle (though obviously, not vice-versa!).
(a) Determine the number of rectangles, of all sizes, that appear in a 4 by 4 unit square. Clearly justify
your answer.
(b) In an N by N unit square, there are exactly 3025 rectangles, of all sizes. Determine the value of
N . Clearly justify your answer.
(c) Suppose we remove two diagonally-opposite corner squares from an 8 by 8 board, as shown in the
diagram below.
Determine how many rectangles, of all sizes, appear on this modified board. Clearly justify your
answer.
CS5002, Fall 2024, Timothy Edmunds – Course Synthesis 1 9
n
In this question we use the notation k to denote n Ck or C(n, k), the number of ways we can select k
objects from a set of n.
!
n n!
We know that = .
k k!(n − k)!
! ! !
n n−1 n−1
We previously developed a combinatorial proof for the identity = + , using the
k k k−1
context of Counting Routes. And in your Problem Set you developed a combinatorial proof for this
identity, using the context of Counting Routes via checkpoints:
! ! ! ! ! ! ! ! ! ! !
n n n n n n n n n n 2n
+ + + ... + + = .
0 n 1 n−1 2 n−2 n−1 1 n 0 n
In this question, we will develop a different combinatorial proof for these two results, using the con-
text of Forming Committees. For parts (a) and (b) we will use the specific value n = 8 though you will
quickly see how these identities hold for all integers n.
Let S be a set of eight Align students, consisting of four Canadian students and four International
students (including Zongrui). Four of these eight students are chosen to form a committee that will
organize social events on campus. This committee must consist of exactly four people.
!
8
(a) We know that there are different ways to form this committee.
4
Determine how many ways we can form the committee if Zongrui is included, and how many
ways we can form the committee if Zongrui is not included. Using your results, clearly explain why
! ! !
8 7 7
= + .
4 4 3
(b) By considering how many 4-person committees can be formed from this set of International students
and Canadian students, clearly explain why
! ! ! ! ! ! ! ! ! ! !
4 4 4 4 4 4 4 4 4 4 8
+ + + + = .
0 4 1 3 2 2 3 1 4 0 4