1)
Give an example of a kind of applications which conventional database systems do not support
[3 marks]
sufficiently well, and explain.
There are not all the applications suitable for using conventional database systems, such as
Google, Yahoo, Facebook,
CS1102
Lecture 6
Web Development:
HTML, CSS and Javascript
Department of Computer Science
City University of Hong Kong
Webpage and Source Code
You can view a webpage on a browser to get information with rich
content
If you look up the source code of the w
CS1102
Lecture4
Input,Output,
ProcessingandStorage
DepartmentofComputerScience
CityUniversityofHongKong
WhatisaComputer?
A computer is an electronic device, operating under the
control of instructions stored in its own memory, that can
accept data (inp
CS3103
Operating Systems
Programming Assignment 3
Introduction
Consider a factory with 36 machines, which are arranged in 6 rows and 6
columns (i.e., 6 machines in each row). The manager of the factory
initiates a number of quality-check (QC) tasks to be
CS3103 Review
Process and thread
Expectation:
Knows about process image, PCB, and state diagram of process.
Knows about the difference between process and thread.
Knows about the difference between user-level thread and kernel-level thread, different
City University of Hong Kong
BCH 1100 Chemistry
Tutorial Exercise
Date:
Student Name:
Student Number:
Multiple Choices
1. Of the following, only _ is impossible for an ideal gas.
a.
b.
c.
V1
T1
V1
V2
V1
V2
=
V2
=
T1
=
T1
T2
T2
=0
T2
d. V1 T1 = V2 T2
e. V2
CS2303 Tutorial Week 6 Notes:
Fast Memos for Hash:
1. In a hash table, the content stored is usually of the form (key, data). Therefore, when you are
given a specific key k, you can find the corresponding key-based data in the table. Suppose the
current s
CS2303 Tutorial Week 6 Notes:
Exercises:
1. Suppose the following keys come in the order: 11, 60, 39, 67. Try the insertion using quadratic
probing for the following two tables separately:
(1) Table size 8, hash function h(x)=x%8
(2) Table size 7, hash fu
CS2303 Tutorial Week 12:
Exercises:
1. (a) Draw the region quadtree for the following bitmap (every grid represents a pixel). Let the
children order be NW, NE, SW, SE and mark the color (white, gray or black) for each node.
(b) Shrink the bitmap to 4*4 by
CS2303 Tutorial Week 10:
Exercises:
1. Insert the following numbers into an empty Heap (Min-Heap)
11, 13, 7, 5, 22, 3, 19, 1, 2
1
2
5
3
1
3
2
2
1
1
1
9
7
2. You are given the following game tree where player 1 takes the first move and the total amount of
CS2303 Tutorial Week 7 Exercises:
1. Design an implementation for Disjoint Set so that the Union operation costs O(1) time while
the Find operation costs O(N) time. (Hint: Use structures like trees by adding links); Improve
your implementation in 1 to giv
CS2303 Data Structures for Media
(2016-2017 Semester B)
Assignment
Statement:
You need to accomplish two tasks in this assignment:
1. Programming (design a game using learned data structures with C+ language)
2. Study a new data structure.
Requirement:
Fo
CS2303 Tutorial Week 4 Notes:
Mathematical Preparations:
(Optional) Proof Methods:
To prove correctness: Proof by Induction
Base case (initialization): Property holds when n=1
Induction Step (maintenance): if Property holds for n=k, then Property holds fo
CS2303 Tutorial Week 3 Notes (Optional):
Problem: Design an algorithm to compute convex hull for a set of points
Definition of Convex Hull: The minimum convex polygon that can contain all the given points.
Example:
Computing the convex hull is equivalent
Your package has arrived.
Your appointment is tomorrow at 10:30am.
The house you inquired about has been sold.
The meeting has been moved to Monday.
Your merchandise is ready for pickup.
The delivery is scheduled for Friday.
Your reservation for this week
CS3103
Operating System Principles
Tutorial 3
CS3161 Operaing System
Principles
1
Q1
What is PCB? What information are usually stored in PCB?
PCB Stands for Process Control Block.
Process State
Program Counter
CPU Registers
CPU Scheduling information
Memo
CS3103 Operating Systems
2016-2017 A
Project: Shared Corporate Bank Account Problem
Due Date: Monday, Nov 21st, 2016. Turn in hardcopy in class, and submit source
code in Canvas.
I. Project Organization
This project will study the coordination of multiple
CS3103 Operating System Principles
Homework 1
1. Describe how you could obtain a statistical profile of the amount of time spent by a
program executing different sections of its code. Discuss the importance of obtaining
such a statistical profile.
Answer:
CS3103 Operating Systems
2013-2014 A
Project: Exploring Multiple Threads with Telephone Operator Simulation.
Due Thursday Nov 28, 3:00pm. Submit hardcopy in class and email soft-copy of
source code to TA at [email protected]
I. Project Orga
CS3103 Operating System Principles
2013-2014 A
Homework 1
Due before class on Oct 10th, hard copy only.
1. Describe how you could obtain a statistical profile of the amount of time spent by a
program executing different sections of its code. Discuss the i
CS3103
Operating System Principles
Tutorial 5
CS3103 Operating System Principles
1
Q1 What are the three requirements that a solution to
the critical-section problem must satisfy? (P6 in
Chapter6 slides)
1. Mutual Exclusion - If process Pi is executing in
CS3103 Operating Systems
2015-2016 A
Project: Shared Corporate Bank Account Problem
Due Date: Tuesday, Nov 24th, 2015. Turn in hardcopy in class, and submit source
code in Canvas.
I. Project Organization
This project will study the coordination of multipl
CS3103
Operating Systems
Tutorial 8
CS3161 Operaing System Principles
1
Q1 What is page fault and what is segmentation fault? Please
explain each concept, as well as state their differences.
Page fault takes place in demand paging when the requested frame
CS3334 Data Structures
Lecture 5: Quick Sort & Merge Sort
By Dr. Ted Chow
Merge Sort
Given:
A[0.n-1]: array to be sorted
B[0.n-1]: buffer array (global variable)
Array of type item
Idea (divide-and-conquer):
Recursively divide A[0.n-1] into two halv
CS3334 Data Structures
Lecture 3: Arrays, Linked Lists, Stacks & Queues
By Dr. Ted Chow
Introduction (1/2)
Learn how to store and organize data in a
computer so that the data can be managed
efficiently
You will learn
Representation of data
Algorithms
CS3334 Data Structures
Lecture 6: Heap, Bucket & Radix Sorts
By Dr. Ted Chow
Binary Tree
It is a tree in which every node has at most
two children.
For example,
2016-17B
Heap, Bucket & Radix Sorts
2
Complete Binary Tree (1/4)
Complete binary tree: A bi