CS 4264 Network Perspectives on
Information, Communication and Media
AY 2016-2017
TOPIC 6
Homophily, Affiliations and Relations
Announcement.
Next week Recess
In-class Midterm Exam
NodeXL Pro and Gephi
1st individual assignment
1st Individual Assessment (
Xiaohui Bei
October 25, 2016
Deadline: November 3, 2016
Algorithms and Theory of Computation
MAS 714 2016
Homework 5
Please hand in your solutions by the end of November 3.
Late submission will result in a deduction of 50% of the total mark.
No teamwork i
CS1020: Data Structure and Algorithms I
Tutorial 8 - Design and Analysis of Algorithms
5 April 2013
Solutions
1. [Fundamental of Big Oh Notation] Rearrange the following functions in
the increasing order of their Big Oh complexity:
(Hint: look up Stirling
CS1020 Lecture Note #8:
Analysis of Algorithms
Measuring amount of resources to run an
algorithm
Lecture Note #8: Analysis of
Algorithms
Objectives:
To introduce the theoretical basis for measuring the
efficiency of algorithms
To learn how to use such me
This course is intended for students in computing and related disciplines whose work focu
interaction issues in the design of computer systems. The course stresses the importance
and usability in the development of computer applications and systems. Stude
CS1020: Data Structures and Algorithms I
Tutorial 3 Problem Solving with Java Library and Java Generics
(15th February 2012)
Suggested Solutions
1. [Java Random Numbers] The Monte Carlo method uses repeated random sampling to
iteratively arrive at a more
CS1020: Data Structures and Algorithms I
Tutorial 2 Advanced Object Oriented Concepts
(8th February 2013)
1. [Object-oriented Design Principles] A Student class is used to keep track of students
within a school. Each student takes a maximum of 7 modules i
CS1010: Programming Methodology
http:/www.comp.nus.edu.sg/~cs1010/
Week 5: Repetition Statements
Objectives:
Understand the program control structure called
loops
Compare the different types of repetition structure
References:
Chapter 4 Lessons 4.7 4.11
http:/www.comp.nus.edu.sg/~cs1010/
WEEK 9
Class Activities
NUS
CS1010 (AY2015/6 Semester 2)
Week 9: Characters and Strings
Characters
Demos #1-3 from Unit #16
Exercise #1: Summing Digit Characters
Strings
Demos #4-7 from Unit #16
Exercise #2: Fill St
CS1020: Data Structures and Algorithms I
Tutorial 4 Abstract Data Types
(22nd February 2013)
1. [Abstract classes vs. Interfaces] An abstract class is one that contains some abstract
methods (abstract methods are methods without implementation). Below is
CS1020: Data Structures and Algorithms I
Tutorial 2 Advanced Object Oriented Concepts
(8th February 2013)
Suggested Solutions
1. [Object-oriented Design Principles] A Student class is used to keep track of students
within a school. Each student takes a ma
CS1020: Data Structures and Algorithms I
Tutorial 5 Linked Lists
(8th March 2013)
Suggested Solutions
1. [Linked List Merging] Using ListNode class and BasicLinkedList class provided in the
lecture notes, and given 2 linked lists whose nodes are in ascend
CS1020: Data Structure and Algorithms I
Tutorial 8 - Design and Analysis of Algorithms
5 April 2013
1. [Fundamental of Big Oh Notation] Rearrange the following functions in
the increasing order of their Big Oh complexity:
(Hint: look up Stirlings approxim
CS1020: Data Structures and Algorithms
Tutorial 6 - Stacks and Queues
15th March, 2013
1. [Stack and Queue Operations] In Java API Edition 7, we have the class LinkedList
which provides queue operations, source:
http:/docs.oracle.com/javase/7/docs/api/jav
Lecturers slides
http:/www.comp.nus.edu.sg/~cs1010/
WEEK 8
Class Activities
NUS
CS1010 (AY2015/6 Semester 2)
Week 8
Unit #14: Functions with Pointer Parameters
Exercise #1: Tracing
Exercise #2: Complete a Program
Exercise #3: Volume and Surface Area
Exe
CS1020: Data Structures and Algorithms I
Tutorial 4 Abstract Data Types
(22nd February 2013)
Suggested Solutions
1. [Abstract classes vs. Interfaces] An abstract class is one that contains some abstract
methods (abstract methods are methods without implem
CS1020: Data Structures and Algorithms I
Tutorial 7 - Recursion
22nd March, 2013
1. [Simple recursion problems]
a. Write a recursive solution along with its Java code to reverse an integer
array (not necessarily sorted). You cannot use any additional arra
CS1020: Data Structure and Algorithms
Tutorial 10 - Hashing
19 April 2013 (Solutions)
1. A good hash function is essential for good hash table performance. A good hash
function is easy to compute and will evenly distribute the possible keys. Comment on
th
http:/www.comp.nus.edu.sg/~cs1010/
WEEK 13
Class Activities
NUS
CS1010 (AY2015/6 Semester 1)
Week 13: C to Java
Unit #20
Exercise #1: Washers
Exercise #2: Point Nearest to Origin
Wrapping Up
CS1010 Final Examination
How to Prepare for Exams?
Post-
CS1020: Data Structure and Algorithms I
Tutorial 9 - Sorting
12th April 2013
1. Perform merge sort on the following array:
5
9
12
7
8
51
31
12
2. Suppose you are required to sort 100,000 integers in ascending order. Given a
choice from 4 classic sorting a
CS1020: Data Structures and Algorithms
Tutorial 1 Java and Simple OOP
(1st February 2013)
1. [Basic Concepts and Coding]
a) The following is a code snippet used in an automated car park information system
to provide motorists information on available park
CS1020 Lecture Note #2:
Object Oriented
Programming (OOP)
A paradigm shift:
From procedural to object-oriented model
Lecture Note #2: OOP
Objectives:
Learn a few more classes in the API
Understand basic features of OOP
Able to use object-oriented modeling
CS1020 Data Structures and
Algorithms I
Lecture Note #1
Introduction to Java
Lecture Note #1: Intro to
Java
Objectives:
Able to start writing Java programs
Able to translate basic C programs learned in CS1010
into Java programs
Reference:
Chapter 1
Sectio
CS1020 Lecture Note #4:
Abstract Data Type
Walls
Lecture Note #4: ADT
Objectives:
Able to understand the need of data abstraction
Able to define ADT with Java Interface
(Java Interface: A group of related methods with empty bodies)
Able to implement da
CS1020: Data Structure and Algorithms
Tutorial 10 - Hashing
19 April 2013
1. A good hash function is essential for good hash table performance. A good hash
function is easy to compute and will evenly distribute the possible keys. Comment on
the performanc
http:/www.comp.nus.edu.sg/~cs1010/
WEEK 7
Class Activities
NUS
CS1010 (AY2015/6 Semester 2)
Week 7: Arrays
Preparation
Unit #11: Random Numbers
Unit #12: Using UNIX I/O Redirection
One-dimensional Arrays
Going through examples in Unit #10
Multi-dimens
CS1020 Lecture Note
#11:
Mix and Match
Combining data structures to solve problems
Lecture Note #11: Mix and
Match
Objective:
Using a combination of data structures to solve
problems
Outline
Mix and Match
Exam matters
[CS1020 Lecture 11 AY2012/3 S2]
2