COMP 1270 Assignment 2.1 (posted March 12, 2016)
DUE: No later than 11:59 PM, Tuesday, March 22, 2016
Objectives:
Note:
Write a reflection
Hash files to verify their authenticity
Use the cloud-based Dropbox to share content
Create additional Weebly embedd
COMP 1270 Assignment 1
DUE: No later than 11:59 PM, Wednesday, February 24, 2016
Objectives:
Note:
Create a Google account.
Create a Twitter account.
Create a Weebly account.
Create a website framework using the Weebly CMS platform.
Utilize numerous Weebl
COMP 2140 Data Structures and Algorithms
Practice Exam
True/False (In the final exam, there will be 10 true/false questions)
[
] An undo stack is used in application software to keep track of your actions and changes.
[
] Traveling Salesperson Problem (TS
COMP 2140 Data Structures and Algorithms
Practice Exam
True/False (In the final exam, there will be 10 true/false questions)
[True] An undo stack is used in application software to keep track of your actions and changes.
[True] Traveling Salesperson Probl
Updated June 14: FIN 2200 location to be determined by department
Updated July 5: Locations added for HNSC 1200, HNSC 1210, PSYC 2440, PSYC 2660
COURSE
SECTION INSTRUCTOR
DATE
TIME
LOCATION
ROOM SPLIT
(alpha)
SEATS
ACCOUNTING
ACC 1100
D01
ACC 1110
D01
Deb
Question 2
a.
b.
We start with A
We visit B and mark as visited
We then visit C and mark as visited
Then we visit D
And next we visit E
And last we visit F.
We need to dequeue all the items. Results will be ABCDEF. Now if we look at the graph, we will see
1. 3 2 1
2. 3 2 1
3. Queue is a first in first out data structure. But in Priority Queue, an
element with high priority is served before lower priority elements instead
of a pure first in first out policy.
Queue: (1) Some online game has limited game serv
Microprocessors contain millions of transistors
each transistor acts as a switch
each transistor acts as a switch
Combined to implement logic functions, higher-level structures, and processors
Eg) A | B = ~ ~(A | B) = ~ (~A) & (~B).
logic gates can e
ISA Instruction Set Architecture
SISD Single Instruction, Single Data
ALU Arithmetic Logic Unit
CU Control Unit
Bus a series of hardware connections that transport address, data, and control signals to and from devices
DIMM Dual In-line Memory Module
BCD
COMP 2080: Assignment 4
Due: April 7, 2016
Instructions
1. Answer all questions
2. Show all your work. You will lose marks otherwise.
3. Have a title page with name and student number
4. You should have handed in an honesty declaration by now. If you have
COMP 2080: Assignment 3
Due: March 20, 2016
Instructions
1. Answer all questions
2. Show all your work. You will lose marks otherwise.
3. Have a title page with name and student number
4. You should have handed in an honesty declaration by now. If you hav
COMP 2080: Assignment 1
Due: January 31, 2016
Instructions
1. Answer all questions
2. Show all your work. You will lose marks otherwise.
3. Have a title page with name and student number
4. Hand in one honesty declaration for all assignments. Assignment w
COMP 2080: Assignment 2
Due: February 16, 2016
Instructions
1. Answer all questions
2. Show all your work. You will lose marks otherwise.
3. Have a title page with name and student number
4. You should have handed in an honesty declaration by now. If you
comp2130-W17
Apr.12, 17
Problem 41: How many pairs of Rabbits are created by one pair in one year ? Assume rabbits do
not die during the year. Further details:
comp2130
2. At the beginning of month 2, these two rabbits have developed into adult rabbit
comp2130-W17
April 12, 17
Combinatorics
Discrete Mathema8cs consists of many areas of mathema8cs. One of these area is
combinatorics.
Combinatorics is the branch of mathema8cs that deals with the study of
congura8on or arrangements of objects.
comp2
comp2130-W17
April 17, 17
Problems involving both MP and AP
Example 9: For a job that you have obtained, you are required to go through a 6-month training,
which could be in Eastern or Western Canada. You can spend the rst 3 months in Victoria or
Vanc
comp2130-W17
Apr.10, 17
Sequences
Many induc>on problems that occur in discrete mathema>cs involve
the concept of sequences
For our purpose, a sequence is a lis>ng of elements of some set
A sequence can be innite or nite
Typically the elements o
comp2130-W17
April 19, 17
Example 22: A collector has 15 gold coins, 20 silver coins and 12 bronze
coins in his desk drawer. When he randomly takes 20 coins from the
drawer, show that he must have selected at least 8 gold coins, at least
9 silver coi
comp2130-W17
Apr.05, 17
Prove (6): 1+2+22.+2n=2n+1-1
Proof: Since 1+2=22-1, the formula holds for n=1.
Assume that 1+2+22+.+2k=2k+1-1 for a kz+
comp2130
We have to show that 1+2+22+.+2k+1=2k+2-1
Principle of Mathema?cal Induc?on (PMI): Role of base
comp2130-W17
Apr.03, 17
Principle of Mathema6cal Induc6on (PMI)
For an open sentence R(x) over a domain S the truth of the quan>ed statementxS, R(x): for
all xS, R(x) was studied with three dierent Proof methods.
When S=N this statement nN, P(n), xN
comp2130-W17
Apr.07, 17
More examples/applica4on of PMI
comp2130
Principle of Mathema>cal Induc>on (PMI): Proof on Cardinality of Power Set;
Examples, Theorems, Problems, Deni>ons: 17-20
More examples/applica>on of PMI
There are oOen known proper>e
COMP 2150
2017 Winter
Dynamic Languages
Basic OO Concepts in Dynamic
Programming Languages: Ruby
all the examples in these notes are on the
website please run them as you go through
them, you may see more things than are
explained in the notes!
We've prev
COMP 2150
Winter 2017
Class Relationships
More on Inheritance and
Method Definition
Chapters 8, 12, 16, and 17
You are used to automatically attempting to think of
classes in terms of hierarchies you look for the
inheritance because the simple examples yo
COMP 2150
Winter 2017
Information Hiding
Encapsulation Facilities
Chapters 4, 8, 12, and 23
(23 also contains elements of OO design that we will return to)
C+
class X: cfw_
public: .
private: .
protected: .
2
Private vs. Protected
Data and function
membe