CIS 262
The physical model is some time refered to as the Data Structure
True
The unit as a digit was first used about 3000BC in Sumaria
True
The zero digit was first though of in India aroud 810AD
True
There are properties of addition and multipcation. Closure Associative Commutative Identify Inverse Distributive Cancellation
True
There can be multiple algorithms to solve the same problems, and they all should produce the same output.
True
To calculate the number of combinations the Formula C(n,r) = n!/(n-r)!r! where n = numbers of objects to choose from and r = number of objects picked
True
Two way recursion is where you use the 'call' direction first, and then the 'return' direction to perform two actions.
True
We define a number to be prime if it has exactly 2 positive divisors. The usual definition of "prime" says that "p is prime if p 1 and the only divisors of p are 1 and p",
True
When you choose an ADT, you need to choose one that lets you locate the item you need, or lets you find a path needed.
True
You can draw a flow chart with MS Word
True
Is the following true for Boolean multiplication 0 x 0 = 0 0 x 1 = 0 1 x 0 = 0 1 x 1 = 1
True
One way recursion is where you use just call direction to perform some action
True
Permutations are ways arranging people, digits, numbers, alphabets etc. It deals with order of things
True
Recursion is like a repeating sequence.
True
What is the law of Identity ?
(A is A)
Perception are (This is a multiple answer question - select ALL that are correct )
- Automatic integrations of your sensations into one easy to comprehend smell, touch, taste, sight or sound - Effectively the basis of all knowledge
What is true about the multiplication principal?
- Can be applied to the 7 chars in a license plate to tet the total possible combinations - It is also called the product rule - Can be applied to a 3 dial lock on a suit case to get the total possible combinations
First level abstractions are .... (This is a multi answer question - select ALL that are correct)
- Cat, dog, fish, ball - Founded on the physical world and perceptions - Are commonly accomplished by children
Other terms for 'concept' are: (This is a multi answer question - select ALL that are correct )
- Class - Word - Mental Entity - Idea
Creating 'Concepts from Concepts' (This is a multi answer question - select ALL that are correct)
- Is a volitional mental process - Requires defining characteristics common to all the base concepts subsummed by the new concept
An algorithm is ( This is a multi-answer question - check all that are true )
- Pseudo code showing a task - Flow chart showing a task - Finite sequence of steps, complete and correct, that can use selection and loops, which performs a specific task precisely, and produces a result
The crow is the (This is a multi answer question - check ALL that are correct)
- Recognition that a mind can only hold a limited number of things in focus at once - Is something you can observe in yourself - The biological/physical basis for the need to create concepts
Which are true about Boolean Algebra ? ( Multiple answer question - Click on all that are true )
- The significance of Boolean Algebra is that it provides the best method to SIMPLIFY Circuit design. - Created by George Bool - Is used to simplify conditions in loops and if statements
What are some basic questions that must be answered by each algorithm ( This is a multi-answer question - check all that are true )
- Time Efficiency - RAM utilization
Which is the Multiplicative Identity ?
1
Recursion is the repetition of series of steps, and while doing so, breaks a problem down into successive smaller parts until they reach a situation where you can no longer break it into smaller parts... This smallest part is called the base or ending case
True
The Depth First algorighm visits all the nodes in a branch to its deepest point before moving up
True
What are 1NF, 2NF and 3NF. Explain each...
1NF, 2NF, and 3NF are simple steps of normalizing data. Each one corresponds to a different level of organization. First Normal Form or 1NF is when we remove the repeating attributes and groups. We should create an entity that truly describes the attributes. We must establish a relationship from the old to the new entities. The Second Normal Form or 2NF is the step where we remove the partial dependency. We move the attributes to an entity in which their values are dependent on the entire identifier. Just like the previous step, we must establish even more relationships between old and newly created entities. The Third Normal Form or 3NF is the step where derived attributes are removed. We move attributes to an entity in which their values are not independent of the identifier. Adding onto that, we must establish new relationships between old and new entities.
Which is not a Complementary Identity ?
A - 2 = 2A
What is a Bijective function.. Give an example.
A bijective function (many-to-one and one-to-one) is a combination of a surjective and injective function. All inputs have a unique output, and all outputs are used. An example of a bijective function is a hash function that is managed to perfectly deal with collisions. All positions in the array are used up and no elements share the same position, they all have different positions.
How does computer arithmetic work for: SUBTRACT
In order to subtract two binary numbers. For example, say we want to subtract X - Y. We must find the 2s complement of Y, and actually add both numbers, X + (-Y). 2s complement allows for negative and positive numbers to be added together. Doing so will result allow one to subtract binary numbers.
What is the MAJOR problem with representing numbers in the computer ? Give several examples...
A major problem with representing numbers in the computer is that when adding two numbers, there may be a problem of overflow. Overflow is when the result of a calculation is too large to fit into a set of numbers of bits. For example, when adding 1010 and 1010, we get 0100, which is definitely not true. In addition, representing fractions in binary will not be accurate and can't be represented exactly.
What is a Partial function.. Give an example.
A partial function is where not every input of data gets assigned an output. One example is in a large household with a limited amount of money, not every person in the house is going to receive a gift for Christmas. It's the saddest story ever, but it's a really good example of a partial function.
What is a set Give an example
A set is a collection of elements with no duplicates and where order does not matter, no order. An example of a set is a set of colored pencils, the order of the pencils doesn't matter and you only get one pencil for each color, you don't get two pencils that both have the same color, no duplicate colors.
What is a Surjective function.. Give an example.
A surjective function (many-to-one) is when each output is given an input, or in other words, where every element in the codomain has one or more elements in the domain. An example of a surjective function is when it comes to sharing a limited amount of items. There may be several students with only one box of coloring pencils. Students may share the coloring pencils but all of them gets used. Some colors get shared more than once and others only get grabbed once, but all the colors are used for whatever they are drawing.
What is the Truth Table for Boolean Multiplication ?
A truth table is the definition for a logic gate. It's used to if an expression with different inputs is either true or false, or in other words, 1 or 0. It consists of columns and rows which illustrates all possible input values and the result achieved when applying a type of relationship.
What is the Injection function.. Give an example.
An injection function (one-to-one) is when each input has a unique output or is assigned a unique output. All inputs have different outputs, none of them share any outputs. An example of injection when people get their social security number. No one has the same social security number with another person. They are unique for each person. In addition, there are still many social security numbers that are not given a person yet.
'Concepts' and the 'Conceptual Hierarchy' directly correspond to what computer programming concepts ...
Class and Inheritance
How does computer arithmetic work for: ADD
Computer arithmetic is similar to addition with decimal integers. We start by adding the digits that begin from the right side of the numbers. If we're adding a 1 and a 0, the result is 1 for that column. If we're adding a 0 and a 0, the result is a zero for that column. But if we're adding a 1 and a 1, we leave a zero for that column but carry that 1 over to the next column to keep adding until we reach the far most left column.
________________ is the act of looking at many things, selecting out those that have similar (defining characteristics) and creating a word that is used to represent ALL those specific things: past, present and future.
Concept Formation
You should read the Week 0 section for updates and refreshing your mind on how this class functions. It is EASIER and time saving, when you PRINT OUT the documents found in week 0 and keep them near by for quick reference !
True
The diamond in a flow chart represents a
Decision
The _____________ is the characteristic(s) that explain the most about a thing.
Defining Property
Your choice to think or not to think will determine how successful you can identify things in the world and put them together into a crystal clear understanding of the world. When you function on the adult level of thought, then you can be creative and productive, thus enjoying life.
True
A graph can never have cyclic relationship between edges
False
All fractions can be represented in a computer exactly.
False
Binary Arithmetic uses only 1 and 0 digits. It is used only on an Abacus.
False
Flow charts are old fashioned and are not useful
False
Given three sets A, B,C The inclusion /Exclusion principle says this formula will gie you a correct count A + B + C - ( A ∩ B ) + ( A ∩ B ∩ C )
False
Loops are always the best solution when writing a program performing repetitive tasks
False
The GCD stands for the Greatest Center Denominator
False
The base 16 number system has the digits 0 to G
False
The computer calculates equally well in either base 2, 8, 10 or 16
False
The efficiency of an algorithm has nothing to do with the type of hardware it is running on !
False
The order of the data in you data structure is the same as the order of the data in the buckets
False
The underlying physical order of the buckets is exactly the same order needed to get the result you want.
False
This function will produce N!void myFunction( int counter) { if(counter == 0)return; else { cout <<counter<<endl; myFunction(--counter); return; } }
False
How does computer arithmetic work for: MULTIPLY
In order to multiply two binary numbers, it's the same process as multiple two decimal integer numbers. We must multiply each digit of the second number by the first WHOLE number. After we have them set up, we simply add all of them. In addition, multiplication can also be done by left shifts, in case we want to multiply a binary number and number of times.
The mature adult mind ....
Functions on the level of 1st level and higher concepts
The Induction pricipal... Many to One.. one a time.. But how can we prove that some thing will always work? We can't check every instance! The answer is that we can often use a "step by step" argument that works in every case. But sometimes we can only do it by climbing up a ladder, going from one instance to another. This is the Principle of Induction. We prove that if it is true for n, then it is true for n + 1, by some argument. So, if it is true for n = 1 then it's true for n = 2. But then, being true for n = 2 it is true for n = 3, and then n = 4 and so on. What we would have done is to provide a method of getting from each n to the next, like some giant infinite ladder.
True
Recursion is like...
Mathematical Induction
The Single-Source Shortest path algorithm displays the shortest path from a designated staring point to every other node in a graph
True
The beginning and the end of a finite sequence has only one each in a list
True
The crow is the limit of how many things you can hold in your mind at once. Induction is the process of creating concepts to over come the limits of the CROW MANY to ONE...
True
The earliest number, 1, was invented by the Sumerians
True
What is program correctness ? How is it accomplished ?
Program correctness is when we prove the correctness of our programs. One method for program correctness is to verify a formula using proof by induction. This will state that our formulas are correct making our program valid and correct. It's simply a term used to state if the algorithms and software in the program are correct and valid, and can be valid if proved using induction.
What are relations
Relations are simple to understand, it's in the word, it's a relationship between two things. In this course, we are concerned with relationships between two different sets. There are three types of relationships, one-to-many, many-to-many, and many-to-one. In addition, there are relationships or relations in a database. We may have a lot of data and tables are a way to organize that data. But they can't just be floating around. We must establish relationships between data tables to keep our database organized.
The formula P ( n, r ) = n! / ( n - r ) ! is the formula for the Permutations or possible outcomes were n = number of objects to choose from, and r = number of objects picked.
True
Give an base 2, 8, 10 or 16 number... generally the shortest version is base 16.
True
The logical model is some time refered to as the Abstract Data Type
True
Given a generalization (a concept), you can compare it with a specific thing and determine if the specific thing is an instance of a generalization (a concept) you already have made. If so, then you already know how to deal that object.
True
Graph are easily implemented with arrays, and use recursion to traverse them.
True
In place of recursion, you can use loops
True
Induction is also called BOTTOM UP logic. It is the process of reasoning from the specific to the general.
True
What are the laws of sets
There are many laws of sets. The main laws of sets are union, intersection, difference, and subset. The union of two sets is the set of all elements in both sets. The intersection of two sets is the set of all elements belonging to both sets. Subset simply means if a set contains all of the elements in another set, that set is a subset of that second set. The difference between the two sets is the set of all elements that are in one set but not in the second set. In addition, we are also given many laws in the textbook at allow us to solve a combination of set operations. There are a total of ten, double complement law, idempotent laws, commutative laws, associative laws, distributive laws, de morgan's laws, Identity laws, annihilation laws, inverse laws, and absorption laws. The first ones listed are named operations and the last ones are called laws for sets.
Explain this: Data Structures + Algorithms = Program
This is simply stating that each abstract data type has many different implementations and algorithms associated with it. You could have a data structure such as a Graph, and by including the many algorithms associated with a Graph, one is able to create a program out of that. For example, we could be designed a program to suggest some mutual friends, with a Graph data structure and algorithms such as Breadth-First Search and Depth-First Search, one is able to make that program possible.
Induction is going from many specifics instances to one general instance (Bottom Up)
True
"A Hasty Generalization", a fallacy in logic, is when you do the inductive process incorrectly, by not having enough information, and create a generalization that does not properly reflect the actual nature of things.
True
A Breadth first search algorithm is where you visit all the nodes on one level before you go to the next level
True
A completed graph is where each node is directly connect to all other node
True
A graph can have weight on an edge. Example: the type of plane, the cost or lenght of the flight between airports
True
A graph simply put is things and the relationship between them, or G = (V, E), where V is the set of Things and E is the set of relationship between them.
True
A path is the actual order you traverse through a data structure
True
A path is the sequences of vertices that connect two notes in a graph
True
Are these all true for Commutative Addition? (two diagrams shown) IN LECTURE NOTES!
True
Are these all true for Commutative Multiplication? (two diagrams shown) IN LECTURE NOTES!
True
Are these four correct using Boolean Addition ? * 0 + 0 = 0 * 0 + 1 = 1 * 1 + 0 = 1 * 1 + 1 = 1
True
Base 10/Decimal number 25 is the same as the Base 2/Binary number 11001
True
Base is the as Radix or Digit count in a number system
True
Combinations are ways of selecting items from a menu, selecting cloths or team members. It is a way to select when order does not matter.
True
Converting from base 2 to 8 or 16 is very easy
True
Data Structure + Algorithms = Programs.
True
Deduction is also called TOP DOWN logic
True
Deduction is going from a existing general concept to identifying one specific instance (Top down)
True
Euclid's Algorithm to find the GCD of two positive numbers:(1) Divide the smaller into the larger getting a quotient and remainder.(2) Replace the larger number by this remainder.(3) While the smaller number is positive go to step (1) and continue.(4) When the smaller number becomes zero, the larger is the required GCD.
True
How does computer arithmetic work for: Divide
Two divide two binary numbers. If we want to divide a binary number by a dividend such as 100, we count the number of zeros and we shift right the same amount of times for our divisor. It's the opposite process of multiplying two binary numbers.
What is un-normalization ..data. Why normalize it ?
Un-normalized when it comes to large amounts of data simply means that all of the data is exactly in one place consisting of many duplicates. This makes it difficult to search through and remove pieces of data when ordered to. Therefore, we must normalize this data. Normalizing is simply the process of organizing data in a large database. We can do this by creating different tables and establishing relationships between these tables.
The focus is
What you choose to hold to hold in your mind
Sensation are
many individual stimuli
Name and give the formula for the laws of propositional logic. Explain why you need logic ? What happens when you do not use logical rules ?
p V T=T, p ^ F=F (Domination Laws) p ^T = p, p V F = p (Identify Laws) p ^ p = p, p V p = p (Idempotent Laws) !(!p)=p (Double Negation Law) p V !p = T (Negation Law 1) p ^ !p = F (Negation Law 2) p ^ q = q ^ p, p V q = q V p (Commutative Laws) (p^q)^r = p ^ (q^r), (p V q) V r = p V (q V r) (Associative Laws) p V (q ^ r) = (p V q)) V(p ^ r), p ^(p^q) = (p ^ q) V (p ^ r) (Distributive Laws) p V (p ^ q) = p, p ^ (p V q) = p (Absorption Laws) !(p ^ q) = ! p V ! q, !(p V q) = ! p ^ ! q (De Morgan's Laws) It is important to use logic to verify if a statement if valid or not. In programming, logic is everything when typing any line of code. Using logic is the first step to making real growth in a society. It simply helps us understand an argument better and help one construct a better response to that argument due to using logic. When we don't use logical rules, we end up not making real growth due to not understanding a combination of conditions or statements. In addition, it makes our reasoning sound poor and our arguments sound ridiculous when we don't use logic. In a computer program, without the use of logic, it will be an unsuccessful program due to not making sense and users will be unable to use that application.