Uploaded by Marc Gromov

Book

advertisement
What is computational
Computational
thinking
thinking refers to a way of approaching problems that is particularly useful in computing. It can also be useful for tackling many other kinds of problems
What is abstraction
Abstraction refers to the process of finding similarities or common aspects between problems and identifying differences and details that don't matter for the task at hand.
What are heuristics?
strategies for simplifying a problem or for guiding an investigation
What is an algorithm?
A sequence of steps required to solve a problem
What is abstraction?
Abstraction refers to the process of finding similarities or common aspects between problems, and identifying differences and details that don't matter for the task at hand
What is decomposition?
Decomposition involves breaking down a large task into a set of smaller tasks
What are two
It ways
can save
in which
time,identifying
and lead topatterns
more elegant
can help
solutions
us to solve problems in computing.
In relation toElegance
algorithms,
refers
what
to does
how desirable
'elegance'the
refer
algorithm
to
is. Specifically how fast, and accurate it is. For example if an algorithm could produce a correct answer, extremely quickly, 99% of the time, it would be extremely elegant.
Why is abstraction
Computers
necessary
are soin
complex,
computing?
that it is impossible for the average person to understand every single detail of how they work.
When can we
When
use abstraction
defining functions
when designing programs?
Explain howYou
functions
don't need
can be
to used
knowto
exactly
achieve
how
abstraction
an argument operates, e.g., print(), as long as you understand how it works
What is an algorithm
A sequence of steps required to solve a problem
Be unambiguous
Consist of a finite number of steps
Algorithms for
Have
computers
a clear flow
must
ofmeet
control
additional
from thecriteria
beginning
thanofnon-computational
the algorithm to thecomputer
end
works, what are they?
What is pseudocode?
A mix of programming language and normal/everyday language used to describe instructions in a program less formally than using a programming language alone
What is the purpose
To represent
of a computer
the instructions
program
in an
in relation
algorithm
to in
ansuch
algorithm
a way that they can be executed by a computer
Best case: When there is the least amount of work
What is the difference
Worst case:
between
When there
worst-case
is the most
scenarios
amount
andofbest-case
work
scenarios in an algorithm, with respect to the work done?
Why do computer
This isscientists
the optiontend
that to
requires
base estimates
the most of
time
work
anddone
is therefore
by an algorithm
the mostonconservative
the worst-case scenarios?
What does algorithmic
Algorithmictime
timecomplexity
complexitymean?
is a measure of how long an algorithm would take to complete, given input n
What is the only
Timefactor that computer scientists consider when looking at algorithmic complexity?
What is meant
When
by 'Linear
the amount
complexity'
of work done is linearly proportional to the input size n
What is meant
Theby
special
Big O notation
notation for describing algorithmic time complexity
What are equivalence
Equivalence
classes
classes
of group
algorithms?
algorithms that have an equivalent (more or less) complexity.
What does 0(n)
A linear
classsearch,
represent?
which runs in 0(n) time
What does 0(1)
An algorithm
class represent?
that only looks at the first item in a data set
What does 0(n^2)
A quadratic
class algorithmic
represent? complexity, one that grows in proportion to the square of the input size. So if n=8 then the output = 64
They allow us to see which algorithms are in the same class
They allow us to quantify the difference in complexity
Why are equivalence
Equivalence
classes
classes
are can
so important?
prevent computer scientists from wasting time looking for better algorithms that don't exist, as they can often be proven mathematically.
Give an example
Linearofsearch
an algorithm
algorithm
that belongs to the 0(n) class
In relation toThe
algorithmic
highest order
complexity,
of 'n' what is considered to be a 'dominant term'.
Explain whatProblems
is meant that
by 'intractable'
no algorithm
problems
can solve in a reasonable amount of time, for example the travelling salesman
What is heuristic,
A rule in
of the
thumb
non-computer
which allows
sense?
us to produce an approximate, yet usable solution to a problem
When are heuristics
When one
useful?
needs a solution to an intractable problem?
The accuracy of a solution ma not always be known
What are two
Some
problems
heuristics
associated
may make
withassumptions
solutions based
about
on the
heuristic
original
algorithms
problems that may not be fair or appropriate.
Under what When
circumstances
the problem
are is
heuristics
fully understood,
best applied?
and the consequences of any assumptions can be known and preferably quantified.
What is a continuous
Analog data,
signal?
in other terms, data that has more than two values (0 and 1), e.g, the amount of numbers between 0 and 1 (infinite)
What is a discrete
Digitalsignal?
data, in other terms, data that has only two values, 1 or 0 (ON/OFF)
What does sampling
The selecting
referof
to?a subset of data, from the a larger data set/population
What is the 'trade-off'
Some information
in sampling?
is lost, as a digital signal can only form approximations from a continuous signal, for example 4.4 becomes 4
What are theItadvantages
is much easier
of storing
to transport,
information
store and
in digital
copyformat?
than the analog alternative.
How many bits are in a8 byte?
What is the largest
1111 1111
value
orthat
255can be stored by a byte in binary and decimal?
How many characters
256 different
total
characters
can be stored
(2^8)in a byte?
How many megabytes
1024 (1024are
is the
there
holy
in anumber
gigabite?
in units of storage, only bits and bytes are the exception)
a) (2^40)
How many bytes
b) (2^50)
are there in a terabyte (a), and a petabyte (b)
Using an example
1000 0001
of a binary,
the 1'slabel
respectively
the most
from
andleft
least
to important
right are: Most
bit important, and least important
What is the first
2^0,place
or 1 value in a binary number?
What does the
It'sposition
place value
of each bit in a byte represent?
State two benefits
Simplicity,
of using
can binary
be carried
numbers
out quickly
in computers
by a computer
NOT
&
What are theAND
names of the two logic circuits used for binary addition?
What base is used for
16Hexadecimal numbers? (0x)
What is the least
16^0,significant
or 1
digit in hexadecimal
0b1110 to Hex
1F = ?
Give one reason
They why
provide
programmers
a way of representing
find Hex useful?
binary values using fewer digits, in hex only two hex digits are needed to represent one byte as 1111 = 15
What is the difference
A half-adder
between
circuit uses
a half-adder
only 2 inputs,
and a full
A and
adder
B, whereas
circuit? a full adder, is more complicated and uses 3 inputs, A,B and C
What is meant
A collection
by the term
of character
characters,
set?
that are used for a specific purpose, such as a language. E.g., in English we use the roman character set
How many characters
128could the original 7-bit ASCII code represent?
How many characters
256can be represented by the 8-bit ASCII
What is Unicode?
Unicode, or the universal character set, allows for non-roman character sets.
What does Unicode
t allows allow
us to represent
us to do? a great variety of characters including those from major languages and many other symbols, such as emoji
Which requires
Unicode,
more storage
as it contains
spacesignificantly
ASCII or Unicode,
more characters.
and why?
What does UTF-8
Unicode-Transformation-Format,
stand for, and what is the relevance
8 bit. Theof8the
means
8 that it uses 8-bit blocks to represent a character.
The UTF-8 method
Meaning
is backward
all encodings
compatible
in ASCII are
withthe
ASCII.
same
What
in UTF-8
does this mean?
What is the main
UTF-8encoding method used on the Internet?
UTF-8 is a variable-width
The characterencoding
set is encoded
method,
with
explain
codesthis
of different
meaning.lengths
What is meant
Theby
unique
a code-point
binary code
in UTF-8
that represents each character
Give an example
U+0080
of how a UTF-8 code point is written
State why ASCII
Theyand
provide
Unicode
standard
are important
ways for computers to represent characters that are readable by other computers.
Download