construct a binary tree Construct the binary tree with prefix codes representing these coding schemes. a) a: 11, e: 0, t : 101, s: 100

discrete math picture

Posted in Test #2 Review | 2 Comments

Angel Garcia

IMG_0158

 

Section 11.7

Question 7

Posted in Test #2 Review | 3 Comments

Test #2 Review

Section 11.4-Exercise #14

20160325_211945 (1)

Posted in Test #2 Review | 6 Comments

Test #2 Review – Christian Guerrero

20160323_132332_HDR

Section 11.2 Number 22

Posted in Test #2 Review | 1 Comment

Announcements from today’s class + OpenLab review assignment

  1. This Wednesday follows a Friday schedule, so I won’t see you again until Monday. Have a great weekend!
  2. Quiz #6/Homework #6 is due on Wednesday, March 30. Complete the following exercises to hand in:
    1. 11.2 #20, 38;
    2. 11.4 # 2, 6, 14, 16, 28;
    3. 11.5 # 1, 2, 6.
  3. Test #2 will cover material from chapter 11 and will be given in class on Monday, April 4. The last day to withdraw officially from the course is Monday, April 11; graded tests will be returned in class that morning.
  4. There is an OpenLab review exercise for Test #2, just like the one you had for Test #1. Choose any exercise from chapter 11 listed on the calendar or from the assigned homework, but make sure nobody has posted it yet. Don’t forget to select the “Test #2 Review” category from the right-hand-side of the screen before you publish your post. Your submission is due by 11:59pm on Friday, April 1. (This is not an April Fools joke!)
Posted in Homework, Quizzes, Test #2 Review | Leave a comment

Links for Monday’s class

Here are two links that will be useful to have handy for Monday’s class:

  1. MTA Subway map
  2. A simpler version of the subway map

Something you can think about before Monday is why 2 might be better than 1. Does this remind you of something we’ve been talking about in class?

Posted in Discussion | Leave a comment

Homework due and quiz #5 – Wednesday, March 16

Section 11.2 #2, 4, 6, 8, 12

Posted in Homework, Quizzes | Leave a comment

Quizzes 1-4

There was a request from the audience to recap the quiz questions from the semester so far. If you were present for all 4 quizzes, your graded solutions are in your blue book and you can ignore the rest of this post. Here they are:

Quiz 1

Describe an algorithm that takes a list of n distinct integers and finds the location of the largest even integer in the list or returns $0$ if there are no even integers.

Quiz 2

Show that f(x)=x^3 is O(x^3) but that f(x)=x^4 is not O(x^3).

Quiz 3

Pick one of the following pairs and show that f(x) and g(x) have the same order.

  • f(x)=3x+7 and g(x)=x
  • f(x)=2x^2-x-7 and g(x)=x^2
  • f(x)=\lfloor x+ \frac{1}{2} \rfloor and g(x)=x
  • f(x)=\log_2(x^2+1) and g(x)=\log_2(x)
  • f(x)=\log_{10}(x) and g(x)=\log_2(x)

Quiz 4 (team quiz)

(Teams were assigned either the bubble sort or the insertion sort algorithm)

  1. Determine the complexity of your team’s algorithm by counting the number of comparisons required. Ignore comparisons needed to determine whether the end of a loop has been reached.
  2. Apply your sorting algorithm to the set \{4, 1, 2, 6\}. Show all the comparisons that are made and count the total number of comparisons. Check that this agrees with your answer from the first part.
Posted in Quizzes | Leave a comment

3.1 #25

0307160034_HDR

Posted in Test #1 Review | 1 Comment

Test#1 Review-Jose Betance

Math2540HW

Posted in Test #1 Review | 1 Comment