1 CS100J 18 October 2005 Arrays Reading: You are responsible for: Secs 8.1, 8.2, 8.3, 8.4 A decimal point I'm a dot in placeSlot machines Cash lost in.

Slides:



Advertisements
Similar presentations
© Trainer Bubble. Cryptic anagram puzzles (the clues are in the questions): dirty room here come dots lost.
Advertisements

Regents Biology Nucleic acids: Information molecules.
1 CS100J 27 March 2007 Algorithms on arrays Reading: 8.3–8.5 Please punctuate this: Dear John, I want a man who knows what love is all about you are generous.
1 CS100J 15 March, 2006 The while loop and assertions Read chapter 7 on loops. The lectures on the ProgramLive CD can be a big help. Some anagrams A decimal.
Recap Sometimes it is necessary to conduct Bad Science – often the product of having too much information Human Genome Project changed natural scientists.
Nucleic acids: Information Molecules
1 CS100J 29 March 2007 Arrays: searching & sorting. Reading: 8.5 Why did I get a Christmas Card on Halloween? Searching and sorting algorithms are on the.
DNA. All living things contain a blueprint for the entire organism inside a special molecule known as _____. DNA stands for _____________________. A DNA.
DNA: The Molecule of Heredity. If the DNA of one cell is stretched out, it makes a 7 ft. long string There are about 5 trillion cells in the human body.
Nucleic Acids -DNA and RNA
CS2110 Recitation Week 8. Hashing Hashing: An implementation of a set. It provides O(1) expected time for set operations Set operations Make the set empty.
What is DNA? Nov. 5, Warm up: 1. What is DNA? 2. Why do we need to learn about it? Your answers should be on the notes page. You have one minute.
1 CS100J 16 March 2006 Arrays Reading: You are responsible for: Secs 8.1, 8.2, 8.3, 8.4 A decimal point I'm a dot in placeSlot machines Cash lost in 'em.
DNA, Genes, & Proteins. Pop Quiz! The DNA molecule supplies _________________ for cells. Is DNA able to be copied? What is DNA made of? What are the four.
DNA The molecule of heredity. The molecules of DNA is the information for life (determine an organism’s traits) DNA achieves its control by determining.
Structure and Function
National 5 Biology Course Notes Part 4 : DNA and production of
D.N.A. DeoxyriboNucleic Acid
Regents Biology Nucleic acids: Information molecules.
1 CS March 2010 Read: Sec and chapter 7 on loops. The lectures on the ProgramLive CD can be a big help. Some anagrams A decimal pointI'm.
1 CS100J 31 October 2006 Arrays: searching & sorting. Reading: 8.5 Merry Christmas!! On Halloween? Searching and sorting algorithms are on the course website.
CS November 2010 Developing array algorithms. Reading: Haikus (5-7-5) seen on Japanese computer monitors Yesterday it worked. Today it is.
Understanding DNA Deoxyribonucleic Acid Double Helix: Two strands twisted around each other like a winding staircase.
The Structure of:.  By the end of the day, you should:  Know what DNA stands for  Understand the shape of DNA and be able to label all parts  Know.
DNA Structure, Function & Replication. DNA stands for… DeoxyriboNucleic Acid.
1 CS100J 29 March 2005 Arrays Reading: You are responsible for: Secs 8.1, 8.2, 8.3, 8.4 A decimal point I'm a dot in placeSlot machines Cash lost in 'em.
1 CS100J 06 March 2008 Read: Sec and chapter 7 on loops. The lectures on the ProgramLive CD can be a big help. Some anagrams A decimal pointI'm.
CS100A, Fall Review of loops 1 CS100A, Fall 1998, Review of Loops and Loop Invariants Some students are still having trouble understanding loop invariants.
You are what you eat!.  Deoxyribonucleic Acid  Long, double-stranded chain of nucleotides  Contains genetic code  Instructions for making the proteins.
DNA: STRUCTURE AND REPLICATION. DNA: The Code of Life  DNA is the molecule that contains all of the hereditary material for an organism  It is found.
GENETICS. Objectives: Objective 10- Identify the differences between DNA & RNA. Objective Identify the mechanisms through which DNA can be mutated.
DNA function and structure. History Francis Crick and James Watson first described the structure of DNA in They received the Nobel Prize for this.
DNA
The Structure of DNA. DNA is a nucleic acid. There are two types of nucleic acids: __________ or deoxyribonucleic acid __________ or ribonucleic acid.
BRAINSTORM In your group, brainstorm all your ideas about DNA. Include What is DNA? Where is DNA found? What is its function? Start Timer
DNA: The Molecule of Heredity
DNA Structure and Replication
Prokaryotic and Eukaryotic Cells: What do all cells have in common?
DNA: The Genetic Material
CS100J 30 October 2007 Algorithms on arrays Reading: 8.3–8.5
THE INSTRUCTION MANUEL FOR BUILDING A BODY
CS October 2009 Read: Sec and chapter 7 on loops. The lectures on the ProgramLive CD can be a big help. Some anagrams A decimal point I'm.
DNA and The Genome Structure and Organisation of DNA
Biochemistry: Nucleic Acids.
Information molecules
KEY CONCEPT DNA replication copies the genetic information of a cell.
Why Anagrams Are Cool! By Scott Trepanier 11/18/2018.
THE INSTRUCTION MANUEL FOR BUILDING A BODY
Aim: DNA & RNA structure
TOPIC: Genetics AIM: What is DNA & RNA?
The Wonderful World of DNA
Unit 6 Notes: DNA Structure
Unit 4 Notes: DNA Structure
Information molecules
Life’s Instruction Manual or What Genes are Made Of
CS100A Lecture 15, 17 22, 29 October 1998 Sorting
KEY CONCEPT DNA replication copies the genetic information of a cell.
DNA Vocabulary.
Additional info: Genes & DNA
DNA.
DNA STRUCTURE AND FUNCTION
CS100A Lecture 15, 17 22, 29 October 1998 Sorting
Genetics DNA.
Information molecules
KEY CONCEPT DNA replication copies the genetic information of a cell.
LECTURE 3: MICROEVOLUTION PART 1 DNA
1. I collect an amino acid and take it to the mRNA strand
CS100J 16 Oct, 2007 Assignment A5: loops
CS October 2010 Read: Sec and chapter 7 on loops. The lectures on the ProgramLive CD can be a big help. Some anagrams A decimal point I'm.
A Quick Review! What determines a proteins function?
Presentation transcript:

1 CS100J 18 October 2005 Arrays Reading: You are responsible for: Secs 8.1, 8.2, 8.3, 8.4 A decimal point I'm a dot in placeSlot machines Cash lost in 'em Animosity Is no amityParishionersI hire parsons Debit card Bad creditSchoolmasterThe classroom Desperation A rope ends it Statue of libertyBuilt to stay free Dormitory Dirty roomThe Morse code Here come dots Eleven plus two Twelve plus oneVacation timesI’m not as active Evangelist Evil's agentFuneralReal fun The earthquakes That queen shakeIntoxicateExcitation Mother-in-law Woman hitlerWestern Union No wire unsent Ronald Wilson Reagan Insane Anglo Saxon warlord Snooze alarms Alas! No more Z's Victoria, England’s queen Governs a nice quiet land William Shakespeare I am a weakish speller William Shakespeare We all make his praise Some Anagrams (permutations of sequences of letters)

2 Today Look at horizontal notation for writing assertions about arrays. Develop several functions that process arrays. The idea is to help you learn how to develop algorithms. Write a function to tell whether two arrays are equal. Write a function to copy an array. Write a function to tell whether two DNA sequences are complements of each other. Look at storing a table of values in a Java array. including adding a value to the table, deleting the last value of the table, deleting some other value from the table. The material on tables is in Sec. 8.4 of course text.

3 Deoxyribonucleic acid (DNA) is the building block of all life. Each DNA strand consists of two strings of bases twisted together to form a double helix. The 4 possible bases are represented by G, A, T and C. In a helix, A and T bond together, as do C and G. The two sequences in a helix are complements. For example, these two sequences are complements of each other: sequence 1:ACGTTAC sequence 2:TGCAATG Paired bases meet at an angle. DNA is a very large molecule; the image shows only a tiny fraction of the typical molecule. For the bacterium Escherichia coli, the image would be 80 kilometers long. For a typical piece of DNA from an eukaryote cell, the image would stretch from Dallas to Washington, D. C.! DNA is not fully stretched out inside a cell but is wound around proteins, which protect the DNA. Taken from

4 Horizontal notation for arrays, strings, Vectors Example of an assertion about an array b. It asserts that: 1.b[0..k–1] is sorted (i.e. its values are in ascending order) 2.Everything in b[0..k-1] is ≤ everything in b[k..b.length–1] b = 0 k b.length b = 0 k b.length 1.b[0..k] is sorted (i.e. its values are in ascending order) 2.Everything in b[0..k] is ≤ everything in b[k+1..b.length–1] b = 0 k b.length

5 Maintain a table of values in an array int[] b= new int[5000]; // The n values in the table are in b[0..n–1] int n= 0; // 0 ≤ n <= 5000 b table of values this part is unused 0 n b.length As a program executes, it may have to maintain a table of values, say temperatures, within an array. The table will start out empty; then values will be added to it. We must say where in the array the values are stored. // Add t to the table: b[n]= t; n= n+1; // Delete last element of table // (assuming it exists). n= n –1;

6 Maintain a table of values in an array b table of values this part is unused 0 j n b.length // Delete value b[j] from the table. If the order of values in the table doesn’t matter: n= n–1; b[j]= b[n]; If the order of values in table does matter: n= n–1; // Move b[j+1..n] to b[j..n–1] // inv: b[j+1..k–1] have been moved for (int k= j+1; k–1 != n; k= k+1 ) { b[k–1]= b[k]; }