COS 126 – Atomic Theory of Matter. Announcements Project – due Friday (1/12) midnight TA Office Hours this week (check website) Lab Help (Mon-Fri 7pm-9pm)

Slides:



Advertisements
Similar presentations
Hashing.
Advertisements

CS203 Lecture 15.
The Singleton Pattern II Recursive Linked Structures.
(())()(()) ((())()(())()(()))
CS208 Coursework 2 Neil Ghani Mark Dukes Handin: Friday 11 March, 12pm, Departmental Office.
Chapter Three: STOICHIOMETRY.
The Mole: A Measurement of Matter OBJECTIVES: Describe how Avogadro’s number is related to a mole of any substance.
Observe Brownian motion of particles.
Mosaics con’t CSE 455, Winter 2010 February 10, 2010.
CSCI 103 – Atomic Theory of Matter. Goal of the Assignment Calculate Avogadro’s number Using Einstein’s equations Using fluorescent imaging Input data.
COS 126 – Atomic Theory of Matter. Goal of the Assignment Calculate Avogadro’s number Using Einstein’s equations Using fluorescent imaging Input data.
MACHINE LEARNING 9. Nonparametric Methods. Introduction Lecture Notes for E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1) 2 
COS 126 – Atomic Theory of Matter. Atomic Theory Overview Brownian Motion Random collision of molecules Displacement over time fits a Gaussian distribution.
 What is the percent composition of N and O in NO 2 ?
Using Chemical Formulas
Chapter 2 Atoms, Molecules and Ions. Formula Weight & Molecular Weight The FORMULA WEIGHT of a compound equals the SUM of the atomic masses of the atoms.
Chapter 8: Chemical composition
Atoms Are They Real? June 2006 A Scorpacuda Presentation.
Wednesday, Nov. 6 th : “A” Day Thursday, Nov. 7 th : “B” Day (11:45 release) Agenda  Collect “Introduction to the Elements” Worksheet  Section 3.4:
Matter Unit.  A unit created to describe atoms because the gram and kilogram are too large to use to define an atom.  1amu = 1.66 x g  g.
The MOLE CH 11.
Chemistry10.1.
Week 6 - Wednesday.  What did we talk about last time?  Exam 1 post-mortem  Recursive running time.
Chapter 7: Chemical Formulas and Chemical Compounds
The Mole: A Measurement of Matter
The Mole and Avogadro’s Number
COS 126 – Atomic Theory of Matter. Goal of the Assignment Calculate Avogadro’s number Using Einstein’s equations Using fluorescent imaging Input data.
Chapter 11 The Mole
Week 7 - Friday.  What did we talk about last time?  Trees in general  Binary search trees.
COS 126 – Atomic Theory of Matter. Goal of the Assignment Calculate Avogadro’s number Using Einstein’s equations Using fluorescent imaging Input data.
Chapter 8: The Mole – Part 1. What is Avogadro’s favorite saying from American History?
Take your periodic table out. What is atomic mass of Carbon Point where you can find it in the periodic table! 6 is atomic number not atomic mass Atomic.
10.1 Measuring Matter Measuring Matter
CompSci 100e2.1 Today’s Topics l Reading:  Sedgewick & Wayne: , l Topics  APTs  Basic Collections: ArrayLists: the expandable array.
10.1 THE MOLE Q4TP – CHEM MATT T.. THE MOLE: A MEASUREMENT OF MATTER What are three methods for measuring the amount of something? How is Avogadro’s number.
Where’s the title? You gotta search for it!. PotW Solution String s = new Scanner(System.in).next(); int[] prev = new int[s.length() * 2 + 2]; Arrays.fill(prev,
Week 10 - Friday.  What did we talk about last time?  Graph representations  Adjacency matrix  Adjacency lists  Depth first search.
How can atoms be counted? When we want to know how many atoms of a substance are in a sample of the substance that we can see, counting the atoms individually.
Vocabulary of Mole Theory. ___ is the amount produced from a reaction in reality. actual yield.
Moles COUNTING BY WEIGHING. Moles (is abbreviated: mol)  It is an amount, defined as the number of carbon atoms in exactly 12 grams of carbon-12.  1.
Section 6.1 Atoms and Moles 1.Students will be able to describe the concept of average mass. 2.Students will be able to demonstrate how counting can be.
Science Jeopardy Units Net Forces Inertia & Friction VelocityAcceleration Q $100 Q $200 Q $300 Q $400 Q $500 Q $100 Q $200 Q $300 Q $400 Q $500 Final.
Counting Atoms. 1/25 Today you will need… A lab paper from side lab table, a calculator, a periodic table, and ONE partner. You can sit next to your partner.
1 Unit 9. 2 How do we measure how much of something we have? How do we measure how much of something we have? n Mass (g) - how much stuff n Volume (L)
Chapter 11 The Mole. I. Measuring Matter A. Counting Particles Chemists needed a convenient method for counting the number of atoms in a sample of a substance.
1 A Case Study: Percolation Percolation. Pour liquid on top of some porous material. Will liquid reach the bottom? Applications. [ chemistry, materials.
WHAT IS A MOLE? SI unit for Amount of Substance A mole is a unit like “dozen” or “pair” or “gross”. It doesn’t represent a measured number, but a counted.
Avogadro’s Number and Molar Conversions Mole: the SI base unit used to measure the amount of a substance whose number of particles is the same as the number.
Chemical Reactions Balancing Equations. n In order to show that mass is conserved during a reaction, a chemical equation must be balanced n You do this.
Building Java Programs Generics, hashing reading: 18.1.
Take your periodic table out. What is atomic mass of Carbon Point where you can find it in the periodic table! 6 is atomic number not atomic mass Atomic.
Slide 1 of 43 Chemistry10.1. © Copyright Pearson Prentice Hall Slide 2 of 43 The Mole: A Measurement of Matter You could measure the amount of sand in.
Mathematical Derivation of Probability
Calculations w/ Atomic Mass and Molar Mass
The Mole and Avogadro’s Number
Particles and Moles Substances can be measured in several ways. They can be: Number of grams Number of particles Number of moles One mole of atoms is.
COS 126 – Atomic Theory of Matter
Chemical Quantities.
Chemistry 1 Notes # 3b Chapter 11 Section 1 THE MOLE & particle/mass calculations Last updated November 18, 2018.
COS 126 – Atomic Theory of Matter
COS 126 – Atomic Theory of Matter
10.1 What is a Mole? A mole of any substance contains Avogadro’s number of representative particles, or 6.02  1023 representative particles. The term.
Chapter 6 Chemical Composition.
Observe Brownian motion of particles.
COS 126 – Atomic Theory of Matter
Chapter 5 Chemical Quantities and Reactions
COS 126 – Atomic Theory of Matter
The Mole Chap. 11 No, not that mole!.
What is the mole? Study design
Chapter 5 Chemical Quantities and Reactions
Presentation transcript:

COS 126 – Atomic Theory of Matter

Announcements Project – due Friday (1/12) midnight TA Office Hours this week (check website) Lab Help (Mon-Fri 7pm-9pm) Output should EXACTLY match examples Can use Diff.java (9.6) Start early…. Exam 2 – Pickup from your TA

Atomic Theory Overview Brownian Motion Random collision of molecules Displacement over time fits a Gaussian distribution

Atomic Theory Overview Avogadro’s Number Number of atoms needed to equal substances atomic mass in grams N A atoms of Carbon-12 = 12 grams Can calculate from Brownian Motion Variance of Gaussian distribution is a function of resistance in water, number of molecules

Bead.java Represent particles (beads) in water API public Bead() public void add(int i, int j) public int mass() // number of pixels public double distanceTo(Bead b) // from center (average) public String toString() Only need 3 values to efficiently store Thoroughly test (simple main)

BeadFinder.java Locate all beads in a given image API public BeadFinder(Picture picture, double threshold) Calculate luminance (see Luminance.java, 3.1) Count pixels with at luminance > threshold Find beads with DFS (see Percolation.java, 2.4) The hard part, next slide… public Bead[] getBeads(int minSize) Returns all beads with at least minSize pixels Array must be of size equal to number of beads

Bead Finder - Depth First Search Use boolean[][] array to mark visited Traverse image Dark pixel – mark as visited, continue Light pixel – create new bead, call dfs DFS algorithm If pixel out-of-bounds, return If pixel has been visited, return If pixel is dark, mark + return Add pixel to current bead, mark as visited Recursively visit up, down, left, right

Bead Finder - Depth First Search Use boolean[][] array to mark visited Traverse image Dark pixel – mark as visited, continue Light pixel – create new bead, call dfs DFS algorithm If pixel out-of-bounds, return If pixel has been visited, return If pixel is dark, mark + return Add pixel to current bead, mark as visited Recursively visit up, down, left, right

Bead Finder - Depth First Search Use boolean[][] array to mark visited Traverse image Dark pixel – mark as visited, continue Light pixel – create new bead, call dfs DFS algorithm If pixel out-of-bounds, return If pixel has been visited, return If pixel is dark, mark + return Add pixel to current bead, mark as visited Recursively visit up, down, left, right

Bead Finder - Depth First Search Use boolean[][] array to mark visited Traverse image Dark pixel – mark as visited, continue Light pixel – create new bead, call dfs DFS algorithm If pixel out-of-bounds, return If pixel has been visited, return If pixel is dark, mark + return Add pixel to current bead, mark as visited Recursively visit up, down, left, right

Bead Finder - Depth First Search Use boolean[][] array to mark visited Traverse image Dark pixel – mark as visited, continue Light pixel – create new bead, call dfs DFS algorithm If pixel out-of-bounds, return If pixel has been visited, return If pixel is dark, mark + return Add pixel to current bead, mark as visited Recursively visit up, down, left, right

Bead Finder - Depth First Search Use boolean[][] array to mark visited Traverse image Dark pixel – mark as visited, continue Light pixel – create new bead, call dfs DFS algorithm If pixel out-of-bounds, return If pixel has been visited, return If pixel is dark, mark + return Add pixel to current bead, mark as visited Recursively visit up, down, left, right

BeadTracker.java Track beads between successive images Single main function Take in a series of images Output distance traversed by all beads for each time-step For each bead found at time t+1, find closest bead at time t and calculate distance Not the other way around! Don’t include if distance > 25 pixels (new bead)

Avogadro.java Analyze Brownian motion of all calculated displacements Lots of crazy formulas, all given, pretty straightforward Be careful about units in the math, convert pixels to meters, etc.

Random Thoughts… BeadTracker and Avogadro are separate clients, must recompile both Can still do Avogadro without other parts working, use sample input Only keep at most two pictures open at a time (run out of memory otherwise) Output format - System.out.printf() "%6.3f" -> _2.354 "%10.4e" -> e-23

Announcements Project – due Friday (1/12) midnight TA Office Hours this week (check website) Lab Help (Mon-Fri 7pm-9pm) Output should EXACTLY match examples Can use Diff.java (9.6) Start early…. Exam 2 – Pickup from your TA