Graph algorithms
Given graph G shown
here What is the
cardinality of G?
A) G = 7
B) G = 8
C) G = 5
D) G = 1
G
5
1
2
4
3
7
8
6
Given graph G shown
here What degree
of vertex
SOME BIOINFORMATICS /
COMPUTATIONAL BIOLOGY:
AN ALGORITHM TO BUILD
EVOLUTIONARY TREES
Ulrike Stege
WHAT IS BIOINFORMATICS/
COMPUTATIONAL BIOLOGY?
an
interdisciplinary field addressing biological problems.
Applies to questions in biology, genetics and bio
Computer Applications in Geography
conducted by the Atkinson research Lab:
High Country and Northern Weather Impacts Laboratory
A survey discussion for CS
David E. Atkinson*
Department of Geography
University of Victoria
Formerly with International Arctic
Implicit Modelling Comes of Age
By Brian Wyvill
University of Victoria
Originally given at Microso1 Asia Beijing:
Driving 7me 4 days 3 hours 16 minutes
Victoria 2017
University of Victoria BC to Bangor N. Wales 7,343km
1528.199 hours 63.67 days
' \ Dist. to start:
0.
02

ES
"115
12
m
Current Vertex:
3/14/17 3/14/17
Current Vertex:
Mml
_'I
Current Vertex: C Dist. to start: 3/14/17
Current Vertex: , Dist. to start: % Current Vertex: Dist. to start: 01
best known dist
Current V
CSC 106
The Prac.ce of Computer Science
Dr Alona Fyshe
You can call me:
Alona (rhymes with sauna)
Prof. Fyshe or Dr. Fyshe (pronounced sh)
. whichever you are comfortable with
Alona Fyshe
A lawn
A sh
Tell me about yourselves
What year is thi
Isabelle Dufour
Ph.D. Student
Data Mining
Music Emo5on Recogni5on
1
Data Mining
Studying and learning through:
instances of example problems and solutions,
acquired knowledge,
observations, records.
Usually falls under the Data Mining labe
Programming Languages
Daniel German
Write a program that computes the distance between two
points (in two dimensions)
Input: a file called input.txt
Each line has four floating point numbers:
x1 y1 x2 y2
Output:
One line per input line, each line is th
Recursion
Happy Interna1onal Womens Day
Uvic Women in CS
h<ps:/wecs.csc.uvic.ca/index.html
Ladies learning code
h<p:/ladieslearningcode.com/chapters/victoria/
Django Girls
h<ps:/djangogirls.org/victoria/
Administrivia
Assignment 4 is out
Graph Algorithms
What is a graph?
A graph is a mathema2cal tool used to
represent a structured system
It is made up of
Nodes or Ver2ces (circles)
Edges (lines)
B
A
C
D
E
F
Graphs
Graphs can have
Paths
There is a path from A to F (A
Python Programming
Administrivia
Oce hours this week are Friday 9:3011:20
Python Programming
You can install Python on your own computer,
or just use the computers in the lab
InstrucGons to install on your computer:
hHps:/developers.google.com/
What is HCI?
An Introduction to Human Computer Interaction (SENG 310)
David Johnson
Human Computer Interaction
The study of the interactions between people & computer interfaces
The process of designing & building software that is usable, useful,
and enjo
Results
Participants ranged in age from 17 to 35, the mean being 21 years (SD = 3.34).
Thirtyfive participants were female and fifteen were male. The average time spent
driving was 5 hours and 15 minutes a week (range 025, SD = 6.38
Figure 1 shows what
Algorithm Prac.ce
You are given a binary value. You are asked to state its
corresponding value in decimal. But, as in so much of life,
CONTEXT IS EVERYTHING!
Binary value Integer  Integer
in 8 bits
unsigned signed
magni
CSc 106:
The Practice of Computer
Science
Algorithms continued
And
Binary, Hexadecimal and 2s
Complement
Our solu(on from yesterday
start
year
no
year % 4 = 0
A is an algorithm solving a
given problem/task if
For any input,
from shiftcypher import *
string_a = "ABCXYZ"
string_b = "CDEZAB"
test_str_a = encryptString(string_a,2)
# This should print CDEZAB
print(test_str_a)
# If the encryption is correct, this will print True
print (test_str_a = string_b)
# Now let's decrypt
te
# This function will return a number between 0 and 25
# that corresponds to the position in the alphabet of
# the character.
def getNumForChar(char):
return ord(char)65
# This function will return a character that appears at
# position num in the alphabe
# should return the number of even numbers
# in the array A
def countEven(A):
# this counts the
evenCount = 0
for number in A:
if number % 2
evenCount
return evenCount
even number in the array
= 0:
= evenCount + 1
# return the even count
# should return t
# this function prints num_stars stars followed
# by a newline character
from future enable print function
def printStars(num_stars):
for i in range(0, num_stars):
print("*"),
def printSquare(width):
# printing a square
for w in range( 0,width):
for h in
CSC106 Lecture 8
Mary Sanseverino
[email protected]
http:/connex.csc.uvic.ca
Phone: 250 472 5792
Drop in help / Office Hours:
Monday 3:30 5:00 pm in ECS 608
Open Door ECS 608
Goals at the end of this
session you will be able to
Create a guessing game alg
20141113
CSC106 Lecture 18
Mary Sanseverino
[email protected]
http:/connex.csc.uvic.ca
Phone: 250 472 5792
Drop in help / Office Hours:
Monday 3:30 5:00 pm in ECS 608
Open Door ECS 608
Next week
Last Lab Next Week Graph Theory:
Check out: http:/youtu.be/
CSC106 Lecture 8
Mary Sanseverino
[email protected]
http:/connex.csc.uvic.ca
Phone: 250 472 5792
Drop in help / Office Hours:
Monday 3:30 5:00 pm in ECS 608
Open Door ECS 608
Goals at the end of this
session you will be able to
Create a guessing game alg
CSC106 Lecture 9
Mary Sanseverino
[email protected]
http:/connex.csc.uvic.ca
Phone: 250 472 5792
Drop in help / Office Hours:
Monday 3:30 5:00 pm in ECS 608
Open Door ECS 608
Goals at the end of this
session you will be able to
Create a recursive algorith
Run Time of Algorithms
Administrivia
Some extra prac9ce problems for DFS, BFS
and Dijkstras are online
See Resources > Extra Examples
I will release the solu9ons next week
You should do them on your own before looking
at the solu9ons!
Searchi
Graph Algorithms Sample
Problems
Perform DFS and BFS on this graph
A
D
B
E
G
F
C
J
H
I
Perform Djikstras on this graph
A
1
2
B
C
3
10
9
D
E
4
8
2
6
F
3
2
H
G
3
Current Vertex:
Dist. to start:
Vertex
best known dist
A
Run Time & Page Rank
Administrivia
Exam
Was out of 37, but I dropped 3 ambiguous
[email protected] (out of 34 on connex now)
There were a set of [email protected] with two right
answers, due to a copypaste error
Attributes of Algorithms
The best algorithm
Ease
CSC 106 Spring 2017
Assignment 1
Due Jan 24, 11:55 pm
To complete this assignment, you should hand in 3 files:
q1.sql
q2.pdf
q3.txt
The .sql and .txt files are supplied on the assignment page on connex. These files
must be edited with a text
The Reading Brain
Alona Fyshe
[email protected]
Department of Computer Science, University of Victoria
1
Administrivia
Assignment due today
Midterm 1 handed back in lab aFer reading
week
If you wrote your ow chart in pencil, and would
like a rem