Introduction to Computer Science

Fall 2012, Room 4263, 9:10~12:00 Thursday

Instructor: Kun-chan Lan

(this course is offered in English)


    * Know what is "Computer science"?
    * Familiarize yourself with the basic
          o Terminologies
          o Principles
          o Theories
    * Also, a strong hands-on focus
          o Homework
          o Project


    * Data storage
    * Computer architecture
    * Operating system
    * Networking
    * Algorithm
    * Programming language
    * Artificial intelligence


‧week 1 (9/20) Professor attended the confererce but we have a speech(行動通訊程式設計(APP 應用軟體)進階培訓課程學員 APP 作品成果發表會). 所以助教會先在課堂上集合大家帶到演講廳聽演講 集合時間8:50 地點 4263
‧week 2 (9/27) Administration issue
‧week 3 (10/4) tutorial on GPS, iRobotsand XWave(John, Steve and Cosmo)
‧week 4 (10/11) Data storage
‧week 5 (10/18) Hardware
‧week 6 (10/25) Operating System(I)
‧week 7 (11/1) Operating System(II)
‧week 8 (11/8) Networking (II)
‧week 9 (11/15) ) Networking (II)
‧week 10 (11/22) Midterm exam, Homework II due
‧week 11 (11/29) Algorithms (I)
Advanced topic
‧week 12 (12/6) Algorithms (II)
‧week 13 (12/13) Programming language
‧week 14 (12/20) Artificial Intelligence
‧week 15 (12/27) Demo for homework II
‧week 16 (1/3)  Final project demo
‧week 17  (1/10) Final exam 

Lecture Slides

week 1 (09/20) Professor attended the confererce but we have a speech(行動通訊程式設計(APP 應用軟體)進階培訓課程學員 APP 作品成果發表會). 所以助教會先在課堂上集合大家帶到演講廳聽演講 集合時間8:50 地點 4263 
week 2 (09/27) slide(9/27) [video]
week 3 (10/04) GPS iRobot [video1] [video2]
week 6 (10/25) [video1] [video2] [video3] [video4]
week 11 (11/29) algorithm [video1] [video2]
week 12 (12/06) [video1] [video2]

Text Book

    * J. Glenn Brookshear, Computer Science -- An Overview, 11th edition, Addison-Wesley
          o ISBN-10: 0132569035 | ISBN-13: 978-0132569033


Prof. Kun-chan Lan
  Office: Room 309 (East Block, Yun-Ping building, Kuang-Fu Campus)
  Office hours: 11-12pm on Monday and Tuesday or by appointment via e-mail
  Email:   This email address is being protected from spambots. You need JavaScript enabled to view it.
  TEL: +886 6 2757575 ext 62550



If you want to borrow iRobot, please contact Paweeya;
2012-12-09 group list 分組名單  
2012-12-10 scenario of irobot project  

project proposalmidterm grade






about term project: Every group can come to borrow the counter(計數器) time is Tuesday 10:00~12:00, 13:00~17:00,  Thursday 9:00~12:00





GPS report deadline is 12/28!!!!

iRobot demonstration on 12/27 class time

before 1/2 midnight, every group should send TA your prediction time
the driving route will be announced in the evening of 1/2





** 東區 北區 every 'main road' (i.e. not including 'lane', 'alley', 'street') the more road info your collect, the higher grade your get

** Remain 1 week only for iRobot demostration, so you can borrow the iRobot on Monday-Friday from 12:00~13:00 or making appointment by e-mail ( This email address is being protected from spambots. You need JavaScript enabled to view it. )

** Project deadline is Jan 3, 2013 before 7 a.m.


2012-12-25 term_project_region  
2012-12-26 Every group who hold iRobot, please bring it to the class tomorrow (12/27). We will demonstrate at 09:10 start from group#1.  
2012-12-28 the FTP server is OK. upload HW02 to address:, account: csie104, password: lenslens  
2013-01-01 every group should submit the road information to TA( This email address is being protected from spambots. You need JavaScript enabled to view it. ) before 7:00am 2013/01/02
the all data will share on this web before 19:00 2013/01/02
the submit format is road_east_groupID.rar ex.road_north_01.rar
the final report about the project
You should submit the following to TA 
by email before 7am, Jan 3, 2013
 Your answer
 Road information you collected (the more you have, the higher grade you will get)
 Your algorithm and explanation (in Word format, one page)
the title is term project final report
and the data format is road_final_groupID.rar ex. road_final _01.rar
for the final project, two routes are provided and the students can choose one of them to
run your prediction algorithms
maximum speed: 40km/hr
time: 8am
Route 1: from 特力屋 to 光復 campus 小東路 entrance
文賢路 -> 和緯路 -> 北門路 -> 長榮路 -> 開元路 -> 勝利路 -> 小東路
Route 2: from  光復 campus 大學路 entrance to 文化中心
大學路  -> 長榮路 -> 林森路 -> 崇明路
term final report尚未繳交 請盡快 沒交沒分數
未繳交的組別有 15 16 18 21 32 11:59am 前交還有分 
之後 GPS 計數器 尚未歸還者 今天歸還 明天開始扣分
2013-01-07 the temporary total score
if you have problem come to see TA
red represent TA didn't have your HW so come to see TA if you care your score.  You should prove you sent or uploaded in time.
看完成績發現有問題請快點來找TA 紅色代表TA沒有你的檔案
到時候要提出證明你是否準時繳交 準時不扣分 遲交友遲交的算分方式

GPS 尚未歸還: 王思驊 林威宏 朱承昱(傳輸線)

計數器:胡家瑋 許岳珩 傅安寧 邵致翔
2013-01-10 about the final exam everyone can bring a A4 paper note
the temporary total score has updated
2013-01-14 Group 33 is the final project winner and Group 24 is the second best. Please pick up the prize from Prof. Lan  
2013-01-23 the final score 
the gps 陳明廷 請歸還!!!!! 不還之後還是要賠錢
計數器 許岳珩(32組), 洪勤硯(47組) 請歸還計數器


*Working as a team (55%)-hands-on exercise
    •Creative project (25%)
    •Home Work Exercise (30%)
        -Three, each one accounts for 10%
*Working as an individual(45% + 10% bouns)
    •Exam (45%)
        - Midterm (20%)  
        - Final (25%)
    •In-class quiz and class participation (10%)


Homework I(Peeking your brain):
    *How your brain wave look like on a computer?
    *Record your brain wave for 30 second 
        -Calculate the average frequency of your brain wave
        -Calculate the average magnitude (i.e. voltage) of your brain wave
    *Generate  theta wave or alpha wave (either by yourself or with a tool something like
    * due : 11/15 midnight
Homework II:
    *In this exercise, we want to answer this question
        -Is it easier to meet your friends on-line or to meet them in real world?
    *Every time when you are on-line
        -Go to this website
        -Enter your student ID and click on the “Start” button on the page
        -Before you go offline, click on the “End” button on the page
    *TA will announce an address let you download data.   
    *Compare your online times with your teammates’
    *Draw the ‘overlay’ time when you and your teammate are both on-line with Microsoft Excel
    *Record your location with GPS
    *A GPS logger will be loaned to you, and you should carry it all the time
    *If you are indoor, find out your GPS location via Google Map and record it manually
    *Download your GPS log everyday
        –See instructions at
            •Remember to recharge the battery!!
    *Compare your mobility data with your teammates’
    *Draw the ‘overlay’ time when you and your teammate are “close” to each other with     Microsoft Excel
        –“close” is defined as your GPS location is less than 10m from your teammates’
Important dates
    *Trace collection period (we only have around 100 GPS loggers)
        –甲班(and 外系/轉系): 10/11-11/10
        –乙班:  11/15-12/14
    *Results due
        –11/15 midnight (甲班) 12/19 midnight (乙班)
        –Submit your results (submission instruction will be announced later)
        –NO late submission
    *The more detailed raw data you collected, the higher grade
        –GPS logger collect location every second
            •So you should have a maximum of 86400 data entries every day
            •GPS can only work outdoor. Estimate your GPS location using Google Earth if you are indoor
            •Your analysis of results should be sensible
            •An example is at
Homework III(Auto-parking):   
    * Learn simple programming via iRobot
    * Use the programmable robot (iRobot) to simulate auto-parking
    * TA will give you a tutorial on how to use and program iRobot (and
      how to use GPS for your homework)
What to do?
    * You will be given two locations A, and B (somewhere around our
    * You need to write a program to move iRobot from A to B
How would I evaluate the performance of your program?
    * How much time it will take for your program to move iRobot from A
      to B (the shorter, the better!)?
    * Could your program park the iRobot exactly at location B? (in this
      homework, we use location B to simulate the 停車格)
Loaning Equipment
    * We only have 17 iRobot ($15K each) but we have more than 100 students
    * The equipment needs to be SHARED
    * The loaning time of any equipment from TA (including iRobot,
      sensor, GPS, etc) is up to 3 days
    * First come, first serve!
    * Make a reservation when all the iRobot have been checked out
iRobot Related Document

Term project

    * Design a car navigation system
    * Car navigation
          o Provide a route from A to B for the driver
          o A good navigation system
                + should provide a route that has the shortest travel
                  time from A to B
                + relies on accurate road information
Road information
    * Traffic light cycle (how long you need to wait for the red light)
    * Road length
    * Number of lanes
    * Traffic density, i.e. how many cars moving on the same road (e.g.

      rush-hours vs. off-peak time)

How to design your navigation system?

     1. Collect the road info from the real-world
     2. Design an algorithm that use those road traffic parameters we previously discuss
        (I only listed 4 parameters, you are strongly welcome to add more if you wish) to
        predict the driving time from A to B

Collect Road information

    * We will assign different teams to collect traffic info for different areas (抽籤)
          o 東區
          o 北區

Example of Traces

路 口 紅 燈 綠 燈
長榮路/大學路 30 seconds 45 seconds
長榮路/裕農路 20 seconds 30 seconds

路 名 路 段 Number of lanes Road length
長榮路三段 小東路-大學路 2 720m

路 名 路 段 Time Car density
長榮路三段 小東路-大學路 7am-8am 1239
長榮路三段 小東路-大學路 8am-9am 1102
長榮路三段 大學路-小東路 7am-8am 1011
長榮路三段 大學路-小東路 8am-9am 1259
    * Car density: In a given duration, the number of cars entering that
      particular road
    * Duration for collection of car density
          o 7-9am
          o 11-1pm
          o 5-7pm
Example of the algorithm
    * Should look like an equation or a function
    * For example
          o Travel time =  red light duration + car speed/road distance
            * number of lanes
          o PS. I did not use ?car density? in the example above?but you
            should try to make use of EVERY possible parameter in your
Demo your algorithm
    * You will need to present your algorithm in mid-semester (3-5
            minutes) and explain how you design your algorithm
Demo your project demo
    * In the end of semester, you will demo your project as the following
    * I will ask you, for example, how long it takes to drive at a speed
      of 30km/hrfrom 成功校區 to Cosco at 1pm
    * You should use the collected road information traces and your
      algorithm to predict the travel time
Score for the final project demo
    * Your score = 25 x ( 1 - D / real travel time)
          -here D = | your predicted travel time ? real travel time |
Project Evaluation
    * Mid-term
          - A 3-5 minute presentation for your navigation algorithm (10%)
              o And one-page, 11-pt-font, double-spaced report that describes/explain/justify your algorithm
    * Final
          - Project demo (15%)
To motivate you
    •The best project (the one that have the most accurate prediction of driving time)
        -will be given a 王品餐劵
    •The 2nd best project 
        -will be given 2 movie tickets 


•In Q&A form
–Questions mostly are from the textbook exercise
•2 Exams
    –Midterm (20%)
    –Final (25%)


•In class
•Problems related to the topics of the week