Behrooz Parhami's website banner

Menu:

Behrooz Parhami's ECE 1B Course Page for Spring 2020

Jigsaw quilt

Ten Puzzling Problems in Computer Engineering

Page last updated on 2020 June 08

Note: ECE 1B used to be ECE 1 (see history at the end of this page)
Enrollment code: 11882
Prerequisite: Open to computer engineering students only
Class meetings: M 5:00-6:15, Buchanan 1930 (on-line for s'20)
Instructor: Professor Behrooz Parhami
Zoom office hours: M 5:00-6:15 (details on GauchoSpace)
Course announcements: Listed in reverse chronological order
Grading scheme: Pass/Fail grade is assigned based on attendance*
Course calendar: Schedule of lectures and links to lecture slides
The ten lectures: Lecture summaries and references
Additional topics: Possible replacements for current lectures
Attendance* record: Please check regularly for possible errors
Miscellaneous information: Motivation, catalog entry, history
Note: The design and goals of this innovative freshman seminar are described in a brief article, a short paper, and a full paper:
- IEEE Computer, Vol. 42, No. 3, Mar. 2009 (PDF file)
- IEEE Trans. Education, Vol. 52, No. 3, Aug. 2009 (PDF file)
- Computer Science Education, Vol. 18, No. 4, Dec. 2008 (PDF file)

Course Announcements

Megaphone 2020/06/08: The spring 2020 offering of ECE 1B is officially over and course grades have been reported to the Registrar. I hope you enjoyed the course, despite the very challenging circumstances we had this quarter. Perhaps I will get to interact with some of you in actual classrooms over the next few years, as you take upper-division and graduate-level classes. Have a pleasant summer! [P.S.: Here is a final lateral-thinking puzzle for you: What is the missing entry in the sequence 16, 06, 68, 88, __, 98?]
2020/06/05: All but three students who need to take oral final exams (notified via e-mail) have already received a "Pass" grade for the course. Those three students must contact me ASAP to schedule a Zoom oral final in the afternoon of Friday 6/5.
2020/05/20: Lecture 9 (a 74-minute video; the last one for the course) is now available. Please view it and answer Q1-Q4 embedded in the slides by 6:30 PM, W 6/03. Once you have submitted your answers for Lecture 9, you are done with the course, provided you have 0 or 1 absence. If you have two absences, you need to contact me to take an oral final exam via Zoom. If you have 3 or more absences, you cannot pass the course. The final attendance record will be posted by Thursday 6/4 and oral final exams will be scheduled for Friday 6/5. I will try to update the attendance list incrementally, as I receive your attendance reports, so that you know your status in the course a couple of days after your last submission.
2020/04/23: With attendance record updated up to Lecture 4, and link to Lecture 5 posted below, we have reached the midpoint of the spring quarter. Hope all of you are doing okay in dealing with challenges of on-line instruction alongside personal/family health concerns. Please don't hesitate to reach out to me if you need any help in academic or other matters.
2020/03/30: In submitting your e-mail answers to questions to confirm attendance, please make sure to include your name and Perm Number at the top of your message. In a class with ~100 students, it is very difficult to find you based only on your e-mail ID. Thanks.
2020/03/23: Welcome to the ECE 1B Web page for spring 2020. As of today, enrollment stands at 93. Please read the grading scheme very carefully, so you can earn a "pass" grade at the end of the quarter. ECE 1B requires no textbook and has no homework assignments or exams during its normal offerings. But, spring 2020 is far from normal. Read on.
[Please report any broken hyperlinks and other problems on this page to the instructor.]
*Special notes for spring 2020:
a. About your instructor: I have been at UCSB since 1988 (almost 32 years) and, before that, taught at other institutions for 15 years. I got my PhD at UCLA in 1973. I am looking forward to celebrating my 50th year as a professor in March 2023!
b. On coronavirus and COVID-19: We are all experiencing enormous difficulties, as we adjust to social-distancing and other restrictions and worry about our own health and the health of our loved ones. I am working hard to master the new style of instruction, but there will be rough edges at the outset. Meanwhile, I will try to be as flexible as possible to accommodate any special needs.
c. Your photo: Those of you who don't have a photo on GauchoSpace, please consider adding one, to make it easier for us to connect.
d. Enrollment: Course enrollment stands at 93 as of today, but it may reach its limit of 100, given the enrollment/add petitions on hand. We will consider increasing the capacity, if needed.
e. First lecture: Please watch this 65-minute video containing an introduction to the course, plus the first lecture. Pay special attention to the requirement for submitting the answers to four questions for each lecture, in lieu of "attendance" verification normally used. The deadline for me receiving the answers via e-mail is 48 hours after the scheduled lecture time. So, plan on submitting your answers by 6:30 PM each Wednesday.
f. The remaining lectures: I will record the remaining lectures as YouTube videos, so there will be no live questioning or discussion. I will accept your questions via e-mail (for quick questions needing a brief answer) or during my office hours (for lengthier ones). This is unfortunate, as interactive puzzle-solving, a main feature of this course, will be lost, but this is one of the compromises I have had to make in order to quickly adjust to the new mode of instruction. Links to lecture videos will be provided under Course Calendar.
g. "Attendance": There is a section near the end of the course Web page where I will record your "attendance," that is, receiving an acceptable e-mail from you about the four questions posed in each lecture. Details are given in the first lecture.
h. Office hours: I have 3 general office hours, M 3:00-4:00 and W 3:00-5:00 (HFH 5155). In addition, my regular lecture times for ECE 1B, M 5:00-6:15, will be devoted to course-specific office hours. So, we are using what is known as the "flipped classroom model": Lectures watched ahead of time, with questions/discussion during the scheduled lecture time.

Grading Scheme

Pass/Not-Pass grading is based on attendance* and class participation. There will be no homework or exam.
0 absence: Automatic "Pass."
1 absence: "Pass" if you submit a written statement to explain the absence. Any explanation is acceptable.
2 absences: Can earn a "Pass" grade by taking an oral final exam covering the two missed lectures.
3 or more absences: Automatic "Not-Pass."
Normally, attendance is taken as follows. Attendance slips are distributed at the beginning of each class session, with additional slips supplied to those arriving up to 10 minutes late. Students write their names and perm numbers on the slips and turn them in before leaving the classroom at the end of the lecture. You have to turn in your attendance slip in person, not through another student.
For spring 2020, we will have asynchronous on-line lectures and a flipped-classroom model, so assessment and grading are different. See the item for 3/23 under Course Announcements above.

Course Calendar

Calendar Course lectures have been scheduled as follows. PowerPoint presentations (up to 2+ MB), and equivalent PDF files, are updated periodically. Please note that any animation in PowerPoint presentations is lost in the PDF versions.
There will be some updating of the slides throughout the quarter, so please pay attention to the "last updated" information shown next to the links for downloading.

Day & Date (Lecture slides, ppt + pdf, and ppt handout) Lecture topic [Lead puzzle]
M 3/30 (ppt, pdf, lecture, last updated 2020/03/20) Easy, Hard, Impossible! [Collatz's conjecture]
M 4/06 (ppt, pdf, lecture, last updated 2020/04/02) Placement and routing [Houses and utilities]
M 4/13 (ppt, pdf, lecture, last updated 2020/04/08) Satisfiability [Making change]
M 4/20 (ppt, pdf, lecture, last updated 2020/04/15) Cryptography [Secret messages]
M 4/27 (ppt, pdf, lecture, last updated 2020/04/23) Byzantine generals [Liars and truth-tellers]
M 5/04 (ppt, pdf, lecture, last updated 2020/04/27) Binary search [Counterfeit coin]
M 5/11 (ppt, pdf, lecture, last updated 2020/05/03) Task scheduling [Sudoku]
M 5/18 (ppt, pdf, lecture, last updated 2020/05/12) String matching [Word search]
M 5/25 (ppt, pdf, lecture, last updated 2020/05/19) Sorting networks [Rearranging trains]
M 6/01 (ppt, pdf, lecture (N/A), last updated 2016/05/26) Malfunction diagnosis [Logical reasoning]
F 6/05, 12:00-7:00 PM (Half-hour oral final exams, to be scheduled for those with 2 absences)
W 6/19 (Grades due by midnight)

Summary and References for the Ten Lectures

Online information access

A one-page summary for each of the ten lectures is included in the following paper; additional print and on-line references are given below.
Parhami, B., "A Puzzle-Based Seminar for Computer Engineering Freshmen," Computer Science Education, Vol. 18, No. 4, pp. 1-17, Dec. 2008. (PDF file)

Lecture 1: Easy, Hard, Impossible
Fun with Fibonacci numbers, by Gareth E. Roberts [Seminar slides]
Fibonacci numbers: family trees for bees (BP's Math+Fun page) [Word file]
More on Collatz's conjecture [Wikipedia article]
On the unprovability of Collatz's conjecture, by C. A. Feinstein [Article]

Lecture 2: Placement and Routing
Houses and utilities puzzle [The Math Forum @ Drexel]
Euler's Formula: VE + F = 2 [Twenty Proofs]

Lecture 3: Satisfiability
Making $5 Using 50 Coins [Ask Dr. Math]
Interactive game, by O. Roussel [The SAT Game]

Lecture 4: Cryptography
Web-based tutorial by P. Gutman [Cryptography and Security]
Web page maintained by T. Sale [The Enigma Cipher Machine]
The Enigma explained [12-minute video]
The fatal flaw in Enigma [11-minute video]
NSA Mathematician David Pery's 65-minute talk on Enigma (cryptography)
Introduction to Cryptography, by John Mason (thebestvpn)
Khan Academy 10-minute video on the Enigma: Part of the module "Journey into Cryptography"

Lecture 5: Byzantine Generals
Saka, P., How to Think About Meaning, Springer, 2007
Resource Web page by A. Montalban and Y. Interian [Liars and Truth-Teller Puzzles] (Link broken?)

Lecture 6: Binary Search
Du, D.-Z., and F.K. Hwang, Combinatorial Group Testing and Its Applications, 2nd ed., World Scientific, 2000 (See Chapter 16, pp. 295-318)
Programs for solving counterfeit-coin problems [Coding resources and hints]

Lecture 7: Task Scheduling
Aaronson, L., "Sudoku Science: A Popular Puzzle Helps Researchers Dig into Deep Math," IEEE Spectrum, Vol. 43, No. 2, pp. 16-17, February 2006
Online Sudoku and other interesting logic puzzles [Logic Games Online]

Lecture 8: String Matching
Website with free online tools for creating word-search and other puzzles [Puzzlemaker]

Lecture 9: Sorting Networks
Hayes, B., "Trains of Thought: Computing with Locomotives and Box Cars Takes a One-Track Mind," American Scientist, Vol. 95, No. 2, pp. 108-113, March-April 2007 [Read on-line]
Parhami, B., Introduction to Parallel Processing: Algorithms and Architectures, Plenum Press, 1999 (See Chapter 7, pp. 129-147, for an introduction to sorting networks)

Lecture 10: Malfunction Diagnosis
Logic problems [Expand Your Mind] (Link broken?)
Somani, A. K., V. K. Agarwal, and D. Avis, "A Generalized Theory for System Level Diagnosis," IEEE Trans. Computers, Vol. 36, No. 5, pp. 538-546, May 1987

Additional Lecture Topics for Possible Future Use

The following additional topics are being considered for inclusion as future lecture topics:

Topic A: Computational Geometry
Puzzles based on visual tricks and optical illusions
Web site devoted to discrete and computational geometry [The Geometry Junkyard]
See lectures 7 and 8 in the fall 2016 offering of the freshman seminar INT 94TN

Topic B: Loss of Precision
Puzzles based on logical paradoxes and absurdities
Parhami, B., Computer Arithmetic: Algorithms and Hardware Designs, Oxford University Press, 2000 (See Problems 1.1-1.3)

Topic C: Secret Sharing
Puzzles based on anonymous complainers and whistle blowers
Shamir, A., "How to Share a Secret," Communications of the ACM, Vol. 22, No. 11, pp. 612-613, 1979
Secret sharing [Wikipedia article]

Topic D: Amdahl's Law
Puzzles on river and bridge crossings
Parhami, B., Computer Architecture: From Microprocessors to Supercomputers, Oxford University Press, 2005 (See Section 4.3)
Amdahl's law [Wikipedia article]

Topic E: Predicting the Future
Puzzles based on determining the next term in a series
Sloane, N.J.A., "Find the Next Term," J. Recreational Mathematics, Vol. 7, No. 2, p. 146, Spring 1974 [GIF]
Sloane, N.J.A., Online Encyclopedia of Integer Sequences [Access on-line]
See lectures 1 and 2 in the fall 2016 offering of the freshman seminar INT 94TN

Topic F: Circuit Value Problem
Puzzles based on parallelization of hopelessly sequential problems
Greenlaw, R., H.J. Hoover, and W.L. Ruzzo, Limits to Parallel Computation: P-Completeness Theory, Oxford University Press, 1995 (See Section 4.2, pp. 75-76)

Topic G: Maps and Graphs
Puzzles based on map/graph coloring and graph properties
Feeman, T.G., Portraits of the Earth: A Mathematician Looks at Maps, American Mathematical Society, 2002
See lectures 9 and 10 in the fall 2016 offering of the freshman seminar INT 94TN

Topic H: Device Variability
Puzzles based on detecting differences in two nearly identical images
Tutorial sources about nanoelectronics device variability and design under variability to be located

Topic I: Cellular Automata
Conway's Game of Life
Wikipedia article on Conway's Game of Life
Martin Gardner's Scientific American article on Conway's Game of Life
Eric Weisstein's Treasure Trove of the Life Cellular Automaton

Topic J: Recommender Systems
Puzzles based on finding similarities or differences among a series of images
Fingerprint matching; Google's page-rank algorithm
Mining massive datasets (YouTube videos) [See in particular video 5.1]
See lectures 3 and 4 in the fall 2016 offering of the freshman seminar INT 94TN

Topic K: 3D Models from 2D Images
Puzzles based on deducing the shapes of 3D objects from 2D projections
3D illudion in 2D drawings (sidewalk art)
Architecrtural visualization; preserving models of historical sites in danger or collapse/destruction;
Modeling industrial parts and assemblies; layered models (3D printing)
See lectures 5 and 6 in the fall 2016 offering of the freshman seminar INT 94TN

Student Attendance Record

Chart

In the following table, absence is marked with a "1" and presense with a "0". The first ten columns correspond to Lectures 1-10, the next column, Σ, is the total number of absences, and "Mrep" is the first few digits of the reversed Perm Number. For example, a student with the Perm Number 9876543 will have a Mrep code of 3, 34, 345, 3456, ... , depending on whether other students have Perm Numbers with the same ending.

For the spring 2020 offering, "attendance" means that you sent the instructor an e-mail message with the subject line "ECE 1B, Spring 2020: Attendance mm/dd" (with the answers to the four questions in the body of the message as A1 to A4, and attached jpg diagrams, if needed), and that your submission was reasonable (not all answers need to be correct, as long as you demonstrate that you did the requisite work). Due to one of our class sessions coinciding with the Memorial Day observance on 5/25, Lecture 10 has been cancelled and attendance will be assessed based only on Lectures 1-9.

1 2 3 4 5 6 7 8 9 0   Σ MrepNotes about attendance, oral final exam, and grade
0 0 0 0 0 0 0 0 0 _   0 00   Pass
0 0 0 0 0 0 0 0 0 _   0 010   Pass
0 0 0 0 0 0 0 0 0 _   0 011   Pass
0 0 0 0 0 0 0 0 0 _   0 016   Pass
0 0 0 0 0 0 0 0 0 _   0 02   Pass
0 0 0 0 0 0 0 0 1 _   1 03   Pass
0 0 0 0 0 0 0 1 0 _   1 05   Pass
0 0 0 0 0 0 0 0 0 _   0 060   Pass
0 0 0 0 0 0 1 0 0 _   1 063   Pass
0 0 0 0 0 0 0 0 1 _   1 08   Pass
0 0 0 0 0 0 0 0 0 _   0 09   Pass
0 0 0 0 0 0 0 0 0 _   0 113   Pass
0 0 0 0 0 0 0 0 0 _   0 117   Pass
0 0 0 0 0 0 0 0 0 _   0 122   Pass
0 0 0 0 0 0 0 0 0 _   0 128   Pass
0 0 0 0 0 0 0 0 0 _   0 14   Pass
0 0 0 0 0 0 0 0 0 _   0 150   Pass
0 0 0 0 0 0 0 0 0 _   0 153   Pass
0 0 0 0 0 0 0 0 0 _   0 158   Pass
0 0 0 0 0 0 0 0 0 _   0 17   Pass
0 0 0 0 0 0 0 0 1 _   1 211   Pass
0 0 0 0 0 0 0 0 1 _   1 214   Pass
0 0 0 0 0 0 0 0 0 _   0 217   Pass
0 0 0 0 0 0 0 0 0 _   0 23   Pass
0 0 0 0 0 0 0 0 0 _   0 24   Pass
0 0 0 0 0 0 0 0 0 _   0 26   Pass
0 0 0 0 0 0 0 0 0 _   0 270   Pass
0 0 0 0 0 1 0 0 0 _   1 272   Pass
0 0 0 0 0 0 0 0 0 _   0 276   Pass
0 0 0 0 0 0 1 0 0 _   1 278   Pass
0 0 0 0 0 0 0 0 1 _   1 280   Pass
0 0 0 0 0 0 0 0 0 _   0 286   Pass
0 0 0 0 0 0 0 0 0 _   0 290   Pass
0 0 0 0 0 0 0 0 1 _   1 297   Pass
0 0 0 0 0 0 0 0 1 _   1 33   Pass
0 0 0 0 0 0 0 0 0 _   0 340   Pass
0 0 0 0 0 0 0 0 1 _   1 341   Pass
0 0 0 0 0 0 0 0 0 _   0 361   Pass
0 0 0 0 0 0 0 0 1 _   1 368   Pass
0 0 0 0 0 0 0 0 1 _   1 369   Pass
0 0 0 0 0 0 0 0 0 _   0 376   Pass
0 1 0 0 0 0 0 0 0 _   1 377   Pass
0 0 0 0 0 0 0 0 0 _   0 41   Pass
0 0 0 0 0 0 0 0 1 _   1 44   Pass
0 0 0 0 0 0 0 0 0 _   0 45   Pass
0 0 0 0 0 0 0 0 1 _   1 46   Pass
0 0 0 0 0 0 0 0 0 _   0 474   Pass
0 0 0 0 0 0 0 0 0 _   0 476   Pass
0 0 0 0 0 0 0 0 0 _   0 502   Pass
0 0 0 0 0 0 0 0 1 _   1 503   Pass
0 0 0 0 0 0 0 0 1 _   1 504   Pass
0 0 0 0 0 0 0 0 1 _   1 51   Pass
0 0 0 0 0 0 0 0 0 _   0 52   Pass
0 0 0 0 0 0 0 0 1 _   1 533   Pass
0 0 0 0 0 0 0 0 0 _   0 5352   Pass
0 1 0 0 0 0 0 0 0 _   1 53552   Pass
0 0 0 0 0 0 0 0 0 _   0 53553   Pass
0 0 0 0 0 0 0 0 1 _   1 57   Pass
0 0 0 0 0 0 0 0 0 _   0 58   Pass
0 0 0 0 0 0 0 0 0 _   0 593   Pass
0 0 0 0 0 0 0 0 0 _   0 597   Pass
0 0 0 0 0 0 0 0 0 _   0 615   Pass
0 0 0 0 0 0 0 0 0 _   0 617   Pass
0 0 0 0 0 1 0 0 0 _   1 626   Pass
0 0 0 0 0 0 0 0 0 _   0 629   Pass
0 0 0 0 0 0 0 0 0 _   0 63   Pass
0 0 0 0 0 0 0 0 1 _   1 64   Pass
0 0 0 0 0 0 0 0 0 _   0 65   Pass
0 0 0 1 0 0 0 0 1 _   2 66   Pass (based on oral final exam on 6/08)
0 0 0 0 0 0 0 0 0 _   0 68   Pass
0 0 0 0 0 0 0 0 0 _   0 690   Pass
0 0 1 0 1 1 1 1 1 _   6 694   Not Pass
0 0 0 0 0 0 0 0 1 _   1 695   Pass
0 0 0 0 0 0 0 0 0 _   0 6965   Pass
0 0 0 0 0 0 0 0 0 _   0 6966   Pass
0 0 0 0 0 0 0 0 0 _   0 697   Pass
0 0 1 0 0 0 0 0 1 _   2 70   Pass (based on oral final exam on 6/05)
0 0 0 0 0 0 0 0 0 _   0 72   Pass
0 0 0 0 0 0 0 0 1 _   0 731   Pass
0 0 0 0 0 0 0 0 0 _   0 736   Pass
0 0 0 0 0 0 0 0 0 _   0 741   Pass
0 0 0 0 0 0 0 0 1 _   1 749   Pass
0 0 0 0 0 0 0 0 0 _   0 773   Pass
0 0 0 0 0 0 0 0 0 _   0 777   Pass
0 0 0 0 0 0 0 0 0 _   0 78   Pass
0 0 0 0 0 0 0 0 0 _   0 79   Pass
0 0 0 0 0 0 0 0 0 _   0 80   Pass
0 0 0 0 0 0 0 0 0 _   0 81   Pass
0 0 0 0 0 0 0 0 1 _   1 8220   Pass
0 0 0 0 0 0 0 0 0 _   0 8227   Pass
0 0 0 0 0 0 0 0 0 _   0 827   Pass
0 0 0 0 0 0 0 0 0 _   0 89   Pass
0 0 0 0 0 0 0 0 0 _   0 90   Pass
0 0 0 0 0 0 0 1 0 _   1 93   Pass
0 0 0 0 0 0 0 0 0 _   0 95   Pass
1 1 1 1 1 1 1 1 1 _   9 98   Not Pass
0 0 0 0 0 0 0 1 0 _   1 995   Pass
1 3 3 2 2 4 4 5 26 _   50 999   Column totals

Miscellaneous Information

Motivation: Whether they work in the industry or in academic research settings, computer engineers face many challenges in their quest to design or effectively employ faster, smaller, lower-energy, more reliable, and cost-effective systems. Most computer engineering students do not begin tackling such problems, and more generally are not exposed to specific challenges of their field of study, until they enroll in upper-division major courses. Meanwhile, during their freshman- and sophomore-year experiences with foundational courses in mathematics, physics, electrical circuits, and programming, they wonder about where they are headed and what types of problems they will encounter as working professionals. This course is intended to provide an introduction to day-to-day problems and research endeavors in computer engineering via their connections to familiar mathematical and logical puzzles.

Catalog entry: 1B. Ten Puzzling Problems in Computer Engineering. (1) PARHAMI. Seminar, 1 hour.
Prerequisite: Open to computer engineering majors only.
Repeat comments: Not open for credit for those who have taken ECE 1.
Gaining familiarity with, and motivation to study, the field of computer engineering, through puzzle-like problems that represent a range of challenges facing computer engineers in their daily problem-solving efforts and at the frontiers of research.

History: This 1-unit freshman seminar (offered since 2007) was proposed and developed by Professor Parhami. The main goal of the seminar is to expose students to challenging computer engineering problems, faced by practicing engineers and research scientists, in a motivating and entertaining way. The course is useful because CE students have very limited exposure to key concepts in their chosen major during their initial studies that involve mostly foundational, basic science, and general-education courses. Beginning with the AY 2013-2014, the seminar was renamed from ECE 1 to ECE 1B to accommodate another freshman seminar, ECE 1A, that exposes students to a roadmap for their studies at UCSB, their career choices, and leading-edge research topics. During fall 2016 and fall 2018, a similar freshman seminar, INT 94TN, was offered at the campus level to introduce science and technology topics to students from different (non-science/engineering) disciplines.
Offering of ECE 1B in spring 2019
Offering of ECE 1B in spring 2018
Offering of ECE 1B in spring 2017
Offering of ECE 1B in spring 2016 (PDF file)
Offering of ECE 1B in spring 2015 (PDF file)
Offering of ECE 1B in spring 2014 (PDF file)
Offering of ECE 1 in spring 2013 (PDF file)
Offering of ECE 1 in spring 2012 (PDF file)
Offering of ECE 1 in spring 2011 (PDF file)
Offering of ECE 1 in spring 2010 (PDF file)
Offering of ECE 1 in spring 2009 (PDF file)
Offerings of ECE 1 in 2007 and 2008 (PDF file)