1) When using PRTK to attack encrypted files exported from a case, which statement is true?
ANS: File hash values will change when they are saved in their decrypted format
2) You have processed a case in FTK using all the default options. The investigator
The University of Hong Kong
FACULTY OF ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE
CSIS1119/COMP2119 INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
Date: 26 May 2015
Time: 9:30am - 12:30pm
Only approved calculators as announced by the Examinations Secretar
The University of Hong Kong
FACULTY OF ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE
CSIS1119/COMP2119 INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
Date: 1st Jnne 2013
Time: 9:30am- 12:30pm
Only approved calculators as announced by the Examinations Secreta
THE UNIVERSITY OF HONG KONG
FACULTY OF ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE
CSIS1119B/CSIS1119C Introduction to Data Structures and Algorithms
Date: 08 May, 2012
Time: 09:30am - 12:30pm
Only approved calculators as announced by the Examinations Sec
THE UNIVERSITY OF HONG KONG
FACULTY OF ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE
CSIS1119A Introduction to Data Structures and Algorithms
Date: 22 Dec, 2012
Time: 09:30am - 12:30pm
Only approved calculators as announced by the Examinations Secretary can
Universal Hashing
(outside the scope of examination)
Issue: No matter how good a hash function is, we can
find a set of keys that hash to the same slot to make
the hashing scheme perform very badly!
What we can do?
Key idea: Use more than one hash functio
COMP 3322
Modern Technologies
on World Wide Web
1st semester 2016-2017
HTML Basics (O2)
Dr. C Wu
Department of Computer Science
The University of Hong Kong
HTML
HyperText Markup Language (HTML) is the main markup
language for displaying web pages and othe
Searching and Binary Search Tree (Outcome (2)
Review: lets revisit the searching problem.
Problem: Given a set of n elements and an element x, return the
location of the element x or report that such an element does
not exist in the set.
Sequential (Linea
Outcome (2): Another data structure - tree
Do you remember whats a graph G(V, E) ?
Tree
a
Edge
b
Cycle
c
1) Directed / Undirected graph g
d
f
e Node/vertex
h
2) A path from vi to vj: a sequence <vi, vi+1,. vj-1, vj> such
that (vk, vk+1) E (set of edges) f
1) Consider the following hash function. Is it an
appropriate hash function? Give evidence to support your
answer.
h(k, i) = (h(k) + i + i2) mod 13 where h(k) = k mod 13
1
2) How about h(k, i) = (h(k) + (i + i2) mod m where m = 2p?
2
AVL Tree Tutorial Exercises
1) Let the balance factor (b) of a node x in an AVL tree
is L (left subtree is taller). When adding a new node,
determine in each of the following cases, whether x is
unbalanced and if not, state the change of b for x. Let
u be
THE UNIVERSITY OF HONG KONG
COMP1117C Computer Programming I
Assignment 3
Deadline: 5:00pm, March 17, 2017
1. [20%] Write a program PerfectNumber.cpp that reads an integer,
and then outputs the string "YES" if the integer is a perfect
number, and "NO" oth
THE UNIVERSITY OF HONG KONG
COMP1117C Computer Programming
Assignment 2
Deadline: 5:00pm, Feb 23, 2017
1. [30%] Write a program sort.cpp that reads four integers and
then prints them in ascending order (i.e., the smallest number first,
THE UNIVERSITY OF HONG KONG
COMP1117C Computer Programming I
Assignment 1
Deadline: 5:00pm, Feb 9, 2017
You can assume that the input of your program is valid; there is no need to check the validity of
the input. There is no need to control the number of
Pointers
COMP1117C
1
Memory address
The main memory is a
collection of memory locations
(or memory cells).
Each memory location has a
unique address.
Actually, we use the address
of a memory cell to read/write
data in that cell.
Thus, every variable you
d
THE UNIVERSITY OF HONG KONG
COMP1117C Computer Programming I
Assignment 4
Deadline: 5:00 pm, April 10, 2017
1. [40%] The great administrator Pt is running a discussion forum. As the number of users
increases, the abuse of bad words becomes a problem. Pt d
THE UNIVERSITY OF HONG KONG
COMP1117C Computer Programming I
Assignment 5
Deadline: 5:00 pm, May 1, 2017
1. [100%] The great TA Pt needs to grade the final exam papers. He is too lazy to grade
them by hand. Thus, he tries to write a program for grading. H
Proofs
Giulio
Chiribella
Department of
Computer
Science
1
Why and where
Learning Outcomes:
O1 Recognize a correct proof
O2 Learn how to make proofs
Where:
Chapters 1.6-1.9 of the textbook
2
Beware of the fakes!
All monks wear monk habits.
Jorge wears a
THE UNIVERSITY OF HONG KONG
FACULTY OF ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE
CSISIllS/COMP2121 Foundations of Computer Science and Discrete Mathematics: Final Exam
Date: 27 May, 2013 Time: 9:30am 12:30pm
Write Your University Number here and also on
Functions
Giulio
Chiribella
Department of
Computer
Science
1
Why and where
Learning Outcomes:
O1 Understand abstract mathematical concepts
O2 Perform abstract thinking
O3 Analyze and enumerate
Where:
Sections 2.3 and 3.2 of the textbook
2
Menu
What
is
Hamiltonian
Graphs
Giulio
Chiribella
Department of
Computer
Science
1
Why and where
Learning Outcomes:
O1 Understand abstract mathematical concepts
O2 Perform abstract thinking
Where:
Section 10.5 and 10.6 of the textbook
2
Menu
What
is a Hamiltonian g
Appendix 2
Sample exercise 1 [O2]
Prove the modus ponens
(p q) (q r) (p r)
Proof.
(p q ) p (p q) p (implica=on law)
(p p ) (q p) (distribu=vity)
F (q p)
q p
q
QED
Sample exercise 2 [O2]
Prove the modus tollens:
(p q) q p
Proof. (p q
Lecture 7:
Independent
events
Giulio Chiribella
Department of Computer Science
1
The independence assumption [O1]
Let S be a sample space and let A and B be two events.
Independence assumption:
If the event A does not influence the event B
then one must h
3 Artificial Intelligence Search to Solve Problems
ENGG 1202B
Introduction to Computer Science
Dirk Schnieders
Acknowledgements: Based on materials from CS188 @ Berkeley & Artificial Intelligence, A Modern Approach, 3 & 5
We are going to learn
Rational
BASIC JAVASCRIPT
Engg1202 Introduction to Computer Science
Overview
Learning JavaScript as a tool
We will learn:
Basic JavaScript syntax
Simple JavaScript usage
Variables, control, functions, etc
We will not learn:
JavaScript in Web pages
Dynamic we
BASIC JAVASCRIPT
Engg1202 Introduction to Computer Science
Overview
Learning JavaScript as a tool
We will learn:
Basic JavaScript syntax
Simple JavaScript usage
Variables, control, functions, etc
We will not learn:
JavaScript in Web pages
Dynamic we
Name: Pang Fong Chun
UID: 3035281299
Is Google Reliable On Protecting Our Privacy?
Google has become part of our daily life already, from the smartphone that occupied
about 80% of market share in smartphone operating system (IDC, 2015), to the email servi
JAVASCRIPT FOR
ASSIGNMENT 2
Engg1202 Introduction to Computer Science
Overview
Note that a new sandbox page will be used for this tutorial
And another sandbox page will be used for the assignment
Advanced JavaScript
2D array
Advanced sandbox usage
S
Tutorial 4
Floating point number
representation and arithmetic
COMP2120B Computer organization
Kevin Lam (yklam2)
Floating point number representation
Suppose we have an 8-bit floating point number with the following format:
Sign
Biased exponent
Signific
Tutorial 3
Flip-Flops
COMP2120B Computer organization
Kevin Lam (yklam2)
Overview
A combinational circuit generates outputs base on the current
input only.
Input
Output
A sequential circuit generates outputs base on the current and
the past input.
Input