Discrete Mathematics for Computer Science Bruce Maggs Lecture 1 COMPSCI 230 Duke University
Pancakes With A Problem!
Course Staff
Prof: Bruce Maggs ([email protected]) TA: Mahanth Gowda ([email protected])
http:/www.cs.duke.edu/courses/fall12/compsci23
Jonathan Contreras
02/09/2017
CSC 230
Module 1 Assignment 3 Chapter 3
3.16
This exercise is asking for a program to determine the mileage obtained by drivers automobiles.
The program will input the gallons used and the miles driven and determine the miles
Jonathan Contreras
03/01/2017
CSC 230
6.21
1. Analysis of the problem
We are being asked to write a program for a new airline. The program consists of selling
the tickets for the automated reservation system. The program will assign seats on each
flight o
Jonathan Contreras
CSC 230
Exercise 5.11
1. Analysis of the problem
The program needs to accomplish a couple of tasks, all having to do with rounding a
number with the function floor. The program needs to use the function floor to round to the
nearest int
Jonathan Contreras
CSC 230
Module 1 Assignment 2- Chapter 2 Program
2.24 (Odd or Even) Write a program that reads an integer and determines and prints whether
its odd or even. [Hint: Use the remainder operator. An even number is a multiple of two. Any
mul
Jonathan Contreras
1/27/217
CSC 230
1.4
a. CPU- Hardware
b. C+Compiler- Software
c. ALU- Hardware
d. C+ preprocessor- Software
e. input unit- Hardware
f. an editor program- Software
1.5 Fill in the blanks in each of the following statements:
a. Input unit
COMPSCI 330: Design and Analysis of Algorithms
8/26/2014
Lecture #1
Lecturer: Debmalya Panigrahi
1
Scribe: Samuel Haney
Overview
Welcome to Computer Science 330. This lecture is an introduction to algorithms. It covers asymptotic
analysis and recurrence r
CPS 102: Discrete Mathematics Quiz 3 Date:
Instructor: Bruce Maggs
Wednesday November 30, 2011
NAME:
Prob # 1 2 3 4 5 6 Total Score Max Score 10 10 10 10 10 10 60
1
Problem 1 [10 points] Find a minimum-cost spanning tree for the following graph.
2
Problem
CPS 102: Discrete Mathematics Quiz 2 Date:
Instructor: Bruce Maggs
Wednesday November 2, 2011
NAME:
Prob # 1 2 3 4 5 6 7 8 Total Score Max Score 5 5 5 5 10 10 10 10 60
1
Problem 1 [5 points] The probability that the Dallas Cowboys win is 66%. The probabil
CPS 102: Discrete Mathematics Quiz 3 Date:
Instructor: Bruce Maggs
Wednesday November 30, 2011
NAME:
Prob # 1 2 3 4 5 6 Total Score Max Score 10 10 10 10 10 10 60
1
Problem 1 [10 points] Find a minimum-cost spanning tree for the following graph.
Solution:
COMPSCI 230: Discrete Mathematics Sample Quiz 2 Problem 1 Date:
Solutions
Wednesday November 2, 2011
The crafty professor has used the following equation to derive an answer of 13 n(HotT opic HelloKitty) = n(HotT opic) + n(HelloKitty) - n(HotT opic HelloK
COMPSCI 230: Discrete Mathematics Sample Quiz 2 Problem 1
The given events are represented as follows Dallas Cowboys win = D Tony Dorsett rushes for 100 yards = T The following data is given in question P (D) = 0.66 P (T ) = 0.27 P (D|T ) = 0.90 We need t
COMPSCI 230: Discrete Mathematics Sample Quiz 1 Problem 1 Date:
Solutions
Wednesday, October 5th, 2011
Such a DFA should not contain any cycle/loop within the path of nodes that go from start state to the accepting states. This is because, if we had such
COMPSCI 230: Discrete Mathematics Sample Quiz 1 Problem 1
0 10 (10 10 )
Solutions
Date:
Monday, October 4th, 2010
Problem 2
Problem 3
0 (100 )
1
Problem 4
Problem 5
(n)(n + 1) The language would contain 0s and n 1s, for all different values of n. Let us a
Jonathan Contreras
CSC 230
Module 2 Chapter 4 Program
4.10
1. Analysis of the problem
The problem wants a program the calculates and prints the average of several integers.
The program needs to take all the integers add them up and figure out the average