Sunday, 29 May 2011

Economics: money, money supply and money creation

Money

In ancient time, people exchange goods for goods, that’s called barter economy. However, the difficulties faced include:

1)  Difficulty to quantitize its value because the value of a good is subjective, some goods like living things are hard to be divided

2)  High transaction cost, low transacted quantity

3)  Hard to meet double-coincidence of wants, that is, trader A wants trader B’s goods while trader B wants trader A’s goods. Also heterogeneity exist among goods, it may cause disagreement of the exchange.

4)  No standard of deferred payment and low durability: goods depreciates time to time so the value of goods in future is less foreseeable.

Therefore money is invented to fulfill the following features:

1)  As a medium of exchange, money is generally accepted to be exchanged so the problem of double-coincidence of wants is solved. Also it’s usually durable to store value, like gold, silver or coins.

2)  Quantitizing and dividing value in a generally accepted way. Purchasing power of money is more foreseeable so it’s also the standard deferred payment.

3)  Scarce and homogenous so that its purchasing power is steady.

Functions of money:

1)  Medium of exchange: it facilitates exchange and hence lowered the cost of exchange

2)  Unit of account: quantitizing value of goods in money terms.

3)  Store of value since money itself is an asset as well.

4)  Standard of preferred payments.

Forms of money

1)  Commodity money

In ancient time people trade with salt, shells and later precious metal like gold and silver. They are scarce and durable, and their face value is equal to their intrinsic value.

2)  Representative money

It face value is less than intrinsic value but it’s convertible to goods of equal amount of its intrinsic values(they have equal amount of backup of goods), like gold and silver certificates.

3)  Credit/inconvertible money

It’s also known as flat money. They have little face value, no back up  and they exchange value fluctuates under change of price level. Examples like legal tender.

4)  Bank deposit money

-  Demand deposit (current account): write cheques to draw on their deposits with no interest usually. It’s money since it’s generally accepted as exchange medium.

-  Saving deposit: interest is given but people can’t write cheques to draw money from it.

-  Time deposit: people can’t draw the money in a specified period, but the interest rate is higher.

-  Negotiable certificate of deposit is transferable.

5)  Electronic money

It’s money without physical form and zero face value, like money stored in octopus card (not octopus card itself)

Types of banks according to their functions

1)  Commercial banks: usually accept deposit, make loans, facilitate financial trade for public.

2)  Merchant banks are underwriter of shares, arrange large scale loans and manage the funds. Their target customers are usually companies or the government.

3)  Central banks: issuing currency; act as government banker and adviser; supervising authorized institutions; being lender of last resort (lending money to banks at discount rate to prevent bank run, interest rate of loans among banks are called HK Interbank Offered Rate), central clearing house, carrying out monetary policy (controlling MS), keep economy’s foreign exchange reserves and negotiating with foreign monetary institutions.

The banks now days may act as both commercial and merchant banks. Also, there’s no central bank in HK, but HKMA act as the central banks, like issuing $10 legal tender and coins.

Types of banks according to their scale

1)  Licensed banks (LB), which they can use “bank” in their names, can accept all kinds of deposits; the minimum paid-up capital is HK$300 mil, like HSBC.

2)  Restricted licensed banks (RLB) can use the word “restricted license bank” in their names, they can only accept time and certificates of deposit. The minimum amount of deposit of HK$0.5 mil. And the minimum paid-up capital is $100 mil., like China Construction Bank.

3)  Deposit-taking companies (DTC) can only accept time and certificates of deposit of at least HK$0.1 mil and have 3 month of maturity period. The minimum paid-up capital is HK$25 mil.

All banks should have liquidity ratio above 25%.

Liquidity ratio = loans repay in 1 month / deposit due in 1 month, which represents the ratio between assets and liabilities.

Money supply

M0 is defined as the monetary base = legal tender issued = Cp (currency in public circulation) + reserve in banks

M1 is defined based on the money as the medium of exchange. M1 = Cp + Dd (Demand deposit)

M2 is defined based on money as a medium of exchange and store of value, including deposit in LB only. M2 = M1 + Ds (saving deposit) + DtLB + CDLB (time deposit and certificate of deposit in license banks)

M3 includes the deposits in the whole three-tier system, and it includes long-term savings and also deposits in RLB and DTC. M3 = M2 + DtRLB + DtDTC + CDRLB + CDDTC.

Note:

1)  The next level of MS includes the last level’s MS. e.g., M2 includes M1.

2)  Except cash leakage to foreign place, M3 usually remains the same. The change in M0~M3 is given by the change in the smaller parts. For example, when a people put $50 into time deposit in license bank, ΔM1 = ΔCp = -$50, ΔM2 = ΔM1 + ΔDtRB = -$50 + $50 = $0.

In HK, HKMA authorized HSBC, Standard Chartered Bank of HK and Bank of China to issue bank notes while HKMA issues $10 legal tender and all coins. In order to stabilize the exchange rate US$1 = HK$7.8, all HK currency issued, are backed up by equivalent amount of US dollar at 1:7.8. The backed up currency has made HKD into an exchange standard.

Money creation

Banks accept deposits, put some as reserve (the reserve ratio is at least the required reserve ratio (rrr) ordered by central bank or government) and loan out the rest to make profit. Loans can be risky since people may withdraw money from time to time. The rrr is set up to prevent bank run to meet customers’ withdrawal.

Assets VS liabilities

To a bank, accepting deposits are liabilities to the bank since the bank owes the customers the sum of money. Similarly, the reserves and loans are assets of bank because the lender owes the bank the sum of money.

When ones put some money into the bank, for a bank the deposit and reserves increase at the same time (of the same magnitude). We have total assets = total liabilities.

Assumption of money creation

1)  Bank only keep required reserve (deposit * rrr) and lends out the rest, i.e., they have exactly zero reserves.

2)  Only demand deposit exists.

3)  All money will be re-deposited into the banking system and no leakage of cash (i) from the bank to the public, and; (ii) in/out of the economy.

Process of money creation

When one deposited a sum $X into the banking system, the bank keeps $X(rrr) and lend out a sum of $X(1-rrr). That money is again divided into reserves and loans. The process continues until all $X becomes required reserve and the money creation process is done. It follows that the deposit increases $X/rrr (because Δdeposit * rrr = Δreserve). Thus 1/rrr is called the banking multiplier. In reality, banks may keep excess reserve; otherwise they can’t meet the req. reserve and they have to call back loans, which are called money contraction.

Actual reserve ratio = actual reserve / deposit and excess reserve = reserve – req. reserve = deposit (actual reserve ratio – rrr).

For example, when one deposited $80 into a bank where rrr = 50%. The bank keeps $80*50% = $40 and lends out $40. When that $40 is again put in the bank they keep $20 and loan out the rest… until $80 becomes the reserve fully. Total increase in deposit = $80 / 50% = $160.

Money multiplier = (Cp + Dd) / (Cp + reserve) = M1/M0, is the multiplier given that there’s some money in public circulation or in central bank.

Saturday, 28 May 2011

Chemistry : Important organic substances

Important organic substances

Polymers

- They are useful since they can have different properties, namely strong, light, head-wearing, good insulators of heat and electricity, flexible, waterproof, can be moulded easily, can be colored easily, can be transparent (that’s not easy for metallic surface), chemically inert and cheap. (Each types of plastic include different properties from the above, not all)

- Polymer is a compound which consists of very large molecules formed by joining together many small molecules repeatedly.

- Polymerization is the process of repeatedly joining together many small molecules (monomer) to form very large molecules.

- Polymers can occur naturally, like wool and silk. Man-made polymers are known as plastics. Regenerated polymers are modified from natural polymers while synthetic polymers are made by chemical reactions.

- Repeating unit is the smallest part of polymer while the whole polymer can be obtained by repeating it. For example, the repeating unit of polyethene is well, ethene.

- Addition polymerization is the reaction where monomers join together repeatedly to form polymer molecules and no atoms are lost from the monomers. They are done usually by the breaking of C=C bond in the monomers are bonding between the monomers.

Example: polystyrene, note that styrene is the common name of ethylbenzene.



- Common addition polymers include polypropene (PP), polyvinyl chloride (PVC), polystyrene, Perspex and polyethene.

- Polyethene can be classified into low density polyethene (LDPE) and high density polyethene (HDPE). LDPE has low density since the polymer chains are separated and have weaker intermolecular forces; LDPE are light and flexible which can be used as wrappings; HDPE has high density since the polymer chains are tangled each other, hence higher intermolecular force and higher density; HDPE are harder so it can be made into bottles.

- Condensation polymers formed when monomers join together repeatedly to form polymer molecules with some small molecules eliminated. For example, nylon by adding diamine and dioic acid, note that –OH in dioic acid and –H in amine has been eliminated.

- Nylon has hydrogen bond between the polymeric chains, hence it has high m.p. and tensile strength.

- Typical condensation polymer includes polyester (dioic acid + ethylene glycol), nylon, urea-methanal and phenol-methanal.

- Thermoplastic are softened upon heating, can be remoulded and hardened when cooled down. Most plastics are thermoplastics.

- Thermosets, can’t be remoulded once it’s cooled. It’s due to the cross linkage between polymeric chains. For example, in urea-methanol, the repeating unit includes –NH- group. When methanal is added, the two H from two –NH- from two polymeric chains and the O in methanal eliminates in forms of water, when a methyl group links the two polymeric chains, which is known as the cross linkage. Typical thermosets includes urea-methanal (white) and phenol-methanal (black). They are often used as the case of electrical sockets.

- It causes environmental problem since it’s non-biodegradable. We can make it biodegradable or photodegradable, or reduce the use of plastics by the 5Rs, etc.

Aspirin, IUPAC name: 2-ethanoloxybenzoic acid

It’s used to reliving pain/inflammation/fever or reducing risk of heart attack. The adverse effect is the irritation on stomach.

Synthesis: It can be prepared salicylic acid (2-hydroxybenzoic acid), forming ester with methanol. So we can use alkaline hydrolysis (back titration) to determine the % content / mass of aspirin contained in a tablet by C9H8O4 + 2NaOH → CH2COONa + C7H5O3Na + H2O, where C7H5O3Na is sodium 2-hydroxybenzoate.

Detergents: cleaning agents

Water has a high surface tension so it beads up on the surface, wetting up the agents slowing and hence can’t clean well. Detergents contains a hydrophobic hydrocarbon tail (alkane chain) and a hydrophilic anionic head (O-Na+).

1) Soapy detergents are made from natural fats and oils. The anionic head is carboxylate, like –COO-K+.

2) Soapless detergents are made from chemicals (petroleum). The anionic head is sulphate like –SO4-Na+.

Detergents as a wetting agent: the anionic head sticks on the water surface and separate the water molecules, then the surface tension decreases and the water spreads (instead of staying as beads) and spreads.

Detergents as an emulsifying and cleaning agent: originally there’s no interaction between water and the grease, the hydrophobic tails dissolves in the grease while the hydrophilic anionic head dissolves in water. Water keeps on attract the anionic tails and lifts the grease off the fabric. Upon stirring, the grease breaks up into tiny droplets and these droplets can’t combine again due to electrostatic repulsion among the anionic heads of the detergents particles. That explains the emulsifying effect and cleaning principle of detergents.

Soapy detergents form ppt when applied in hard water (which contains a greater amount of dissolved Ca2+ and Mg2+ ions due to displacement in the carboxylate ions. The insoluble white ppt accumulated is called scums. However, soapless detergents easily cause allergic, and it’s non-biodegradable.

Fats and lipids


Lipids are in forms of triglyceride, which is a condensed product from glycerol (1,2,3-propantriol) and fatty acids (a long chain carboxylic acid). Upon hydrolysis it becomes glycerol and fatty acids. So we can apply alkaline hydrolysis such that fatty acids become sodium carboxylate, which is a detergent. Therefore by heating oil and conc. NaOH we can obtain soapy detergents. We add conc. NaCl to lower the solubility of soap in water and a “soap cake” floats on the surface.

Soapless detergents can be prepared by alkylbenzene from petroleum. Upon sulphonation (conc. H2SO4 (aq) + excess SO3 (g)), SO3H group is added on the para- position. Adding NaOH would give SO3-Na+ and it can be soapless detergents.

Unsaturated fats means that it contains C=C bond (unsaturated compounds), which has a lower melting point (packed less regularly), usually liquid state in room temperature. So we hydrogenate the unsaturated fats to produce margarine. However, the by-product with trans- C=C bonds can’t be digested and accumulates in our body, which is known as trans fats, increasing risk of heart diseases.

Carbohydrates

Simple carbohydrates are known as sugars or saccharides. Monosaccharides are carbohydrates like glucose and fructose that can’t be cleaved into smaller carbohydrates by acidic hydrolysis, disaccharides can be broken down into two monosaccharides by hydrolysis while polysaccharides can be broken into more monosaccharides.

Monosaccharides can be classified into aldoses (containing aldehyde group) or ketoses (containing a ketone group). Glucose is a aldohexose with three structure, one is open-chain while another two is in cyclic form. The figure shows the open structure of glucose. The cyclic form is given by linking the first and last carbon by the O instead of the carbonyl group.


Proteins and polypeptides

Amino acids are in forms of H2NCHRCOOH, where R differs for different amino acids.

It condenses into a dipeptide by eliminating H2O from –COOH + H2N- to –CONH- + H2O.

Hydrolysis can be carried out: acidic hydrolysis gives Cl-H3N+CHRCOOH while alkaline hydrolysis gives H2NCHRCOO-. In living organisms the process are done by enzymes instead of chemicals.

Friday, 27 May 2011

Chemistry : Organic synthesis

Organic synthesis

I just want to say that the procedures for different organic reactions are different, it needs your own practice. Also, method (2,3) are out syb. in HKDSE.

In organic reactions the percentage yield is not 100% every step (about 70%), so we should use the least steps to produce one product.

Some techniques:

1) Switching position of a functional group

RCH2CH2X → RCH2CH2OH (NaOH, reflux) → RCH=CH2 (dehydration)→ RCHXCH3 (HX)

Similar techniques can be applied on alcohol.

RCH2CH2OH → RCH=CH2 (dehydration) → RCHXCH3 (HX) → RCH(OH)CH3 (NaOH, reflux)

2) Inserting a carbon atom in benzene

Apply alkylation on aromatic compounds, but rearrangement between carbon atoms occurs for longer chain, so we can use acylation (acylium ion won't rearrangement since it's stabilized by resonance)


3) Inserting a carbon atom into alkane by HCN

Since HCN is extremely toxic and volatile, it's prepared during the experiments by 2KCN + H2SO4 → 2HCN + K2SO4.

From the hydroxyalkanenitriles we can also produce amine by reducing the cyanide group into CH2NH2 (by LiAlH4)


General experimental procedure in organic synthesis

1) Planning the reaction steps

2) Produce the desired product (carrying out the reaction)

3) Separation, purification and drying of product

4) Calculate the percentage yield (actual/theoretical product * 100%)

Distillation

We can separate the unreacted reagents, by-products and catalysts by distillation if they have a large difference in volatility or boiling point. For example, if the unwanted substance has high boiling point (like carboxylic acid), we can use water bath to heat the solution and distillate the products. Besides water bath, oil bath or Bunsen flames can also be applied for higher temperature.

Fractional distillation

We only collect the distillate at a certain range about the b.p. of the products. This separate most of the unwanted substances. Glass beads are applied to give higher surface area for condensation and vaporization of the products.

Liquid-liquid extraction

By the like-dissolve-like principle, we can put the solution in a separating funnel. We can hold the stopper and tap firmly when shaking the separating funnel (open the cap regular to release pressure), allow the two layers to separate and run off the lower layer. Then organic and aqueous layers are separated.

1) Organic solvent (dry ether) can be added. Upon shaking the organic product preferentially dissolves in dry ether, then dry ether can be removed by distillation (b.p. of ethoxyethane is 35ºC)

2) Aqueous solvent can be added to dissolve unreacted or by-products. For example, unreacted alcohol dissolves in HCl, then only the reacted product are left in the organic layer.

Re-crystallization

We use a solvent that has no reaction with the product, dissolve the product in minimum amount of hot, conc. solvent, filter the impurities, then allow it to cool down slowly while impurities may stay in the solvent. Collect the crystals by filtrations.

Take BuOH + HBr → BuBr + H2O under reflux as example (Bu is the butyl group)

1) We prepare HBr by conc. H2SO4 and NaBr.

2) Distillate the crude product (oily drops) from the distillate.

3) Allow aqueous and organic layer to separate, remove the aqueous later by teat pipette (crude product might be slight denser than aqueous product).

4) Put the distillate into separating funnel and add HCl to remove unreacted BuOH. Treat the organic layer with NaHCO3 to remove unwanted acids and separate them by separating funnel again.

5) Use anhydrous Na2SO4 to dry the solution until the liquid is clear.

6) Filter the solution. Collect BuBr by fractional distillation.

Note that the percentage yield is usually quite low because:

1) Uncompleted reactions

2) Side reactions, especially acid reaction vs redox reaction

3) Product is lost during purification

Tuesday, 24 May 2011

Doc. version of notes updated

What have been updated:
Macroeconomics
- The topic "National income statistics and inflation" has been updated with the section "other macroeconomic problems"
- The topic AD-AS model and fiscal policy uploaded

Organic Chemistry
The following topics have been added:
- Nomenclature (29)
- Isomerism (30)
- Typical reactions (31)
The following topic have been added to the to do list
- Polymers (28)
The following topics will be integrated, but they may not be integrated in this season:
- Introductive organic chemistry (26,27) and  nomenclature (29)
- Polymers (28) and important organic substances (33)
- Typical reactions (31) and organic synthesis (32)

Monday, 23 May 2011

Chemistry: Typical Organic reactions

No pictures here, but it'll appear in the doc. ver.

Also, it seems that there're several out.syb. stuffs here. including:

- the term electrophilic addition

- diol by OsO4

- alc. KOH

- pyridinium chlorochromate

1) Alkane

- Combustion: under complete combustion we have CnH2n+2+(3n+1)/2 O2 → nCO2+(n+1)H2O

- Halogenation: substituting a halogen atom into a alkane CnH2n+2 + X2 → C2H2n+1X + HX under un light or heat. (uv is better) Under excess alkane the major product is C2H2n+1X where reaction take place on each molecule once only. Under excess halogen, all hydrogen attached to carbon is substituted by halogen, and becomes CnX2n+2.

2) Alkene

- Electrophilic addition: RCH=CHR1 + X-Y → RCHXCHYR1.

e.g. addition of hydrogen or addition of halogen in organic solvents [2].

- Hydration by cold, concentrated H2SO4

- When HA is added to asymmetrical alkene, Markovnikov's rule states that the major product is that the hydrogen atom is added to the carbon atom already carrying more hydrogen atoms. For example, when Br2 is added to propene, the major product is 2-bromopropane since the there're more H on the first carbon atom.

- This is also a test for existence of double/triple bond. When bromide is added to unsaturated compounds, it changes from brown to colourless.

- Oxidizes into diol by cold, dilute K2Cr2O7/OH- or OsO4.

3) Haloalkane

- Preparation by dehalogenation under alcoholic alkaline environment

- Zaitsev's rule states that under elimination the substituent on C with less H are more likely to be eliminated. For example, when 2-chlorobutane is undergoing dehalogenation, but-2-ene is the major product instead of but-1-ene.

- Substitution to alcohol under NaOH and reflux.

4) Alcohol

- There are three classes of alcohol, including primary secondary and tertiary alcohol, depending on the number of alkyl groups attached to the C atom linked with the hydroxyl group. For example, ethanol is primary; cyclopentanol is secondary while 2-methyl-propan-2-ol is tertiary.

- Primary and secondary alcohols become haloalkane under anhydrous environment and ZnCl2.

- Tertiary alcohols readily changes into haloalkane under concentrated HCl and room temperature.

- HBr is prepared by H2SO4+NaBr while HI is prepared by H3PO4+NaI in laboratory.

- React with PBr3: 3ROH + PBr3 → 3RBr + H3PO3 under reflux. PBr3 is prepared by mixing red phosphorus and bromine.

- React with PCl5: ROH + PCl5 → RCl + POCl3 + HCl

- React with SOCl2: ROH + SOCl2 → RCl + SO2 + HCl under reflux.

- Dehydration on 1º alcohol by excess conc. H2SO4 and heating.

- Dehydration on 2º alcohol by 80% H2SO4 and heating.

- Dehydration on 3º alcohol by 20% H2SO4 and heating.

5) Oxidation among alcohol, aldehyde and ketone

Under oxidation, 1º alcohol → aldehyde → carboxylic acid

The common oxidizing agents include acidified/alkaline potassium permanganate (KMnO4/H+ or /OH-) and acidified potassium dichromate (K2Cr2O7/H+).

For example, the oxidation of ethanol to ethanoic acid by acidified potassium permanganate.

Note that under such strong oxidizing agent, the aldehyde is not isolatable, if aldehyde is to be obtained, we can use PCC(pyridinium chlorochromate) as [O].

Under oxidation, 2º alcohol → ketone by similar oxidizing agent. No further reactions occurred.

There is no oxidation process for 3º alcohol since aldehyde can't be formed (=O) without kicking one of the alkyl group and this is impossible.

6) Reduction among alcohol, aldehyde and ketone

- Under reduction carboxylic acid, aldehyde or ketone reduces back to alcohol.

- Lithium aluminium hydride (LiAlH4) must be applied in anhydrous environment since it's explosive with water, so dry ether (ethoxyethane/diethyl ether/CH3CH2OCH2CH3) as the solvent. Acid must be used in a separate step. Write 1) LiAlH4 2) H3O+ (or H+) on the arrow.

- NaBH4 is a weaker reducing agent which can't reduce carboxylic acid.

7) Carboxylic acids

Condensation is the reaction in which two or more molecules react together to form a larger molecule with the elimination of a small molecule like H2O.

Esters is a good solvent and have a sweet smell so it's used as artificial flavorings.

Fischer esterfication is the reversible reaction R1COOH+R2OH→R1COOR2+H2O under conc. H2SO4.

Preparing amide:

2CH3COOH + (NH2)2CO3 → 2CH3COO-NH4 + CO2 + H2O or RCOOH + NH3 → RCOO4NH4+ help us to prepare the ammonium carboxylate, then by heating RCOO4NH4+ →RCONH2 + H2O. Excess conc. ethanoic acid is used to prevent the dissociation of the salt before it dehydrates.

8) Esters

- (Acidic) hydrolysis: by adding water to ester it becomes alcohol and carboxylic acid.

- In alkaline solution, we can add NaOH to produce RCOO-Na+. Since this removes the carboxylic acid, the equilibrium goes to complete. Remove the alcohol by distillation in reflux set up. After ROH is collected we obtain RCOOH by adding excess mineral acid.

9) Amides

- In acidic solution: RCONH2 + H3O+ → RCOOH + NH4+, e.g. CH3CONH2+HCl→CH3COOH+NH4Cl

- In alkaline solution: RCONH2 + OH- → RCOO- + NH3, e.g. CH3CONH2+NaOH→CH3COO-Na++NH3

Note:

1) We won't discuss the regionospecific properties here.

2) Adding halogen in aqueous form gives different product. e.g., CH2=CH2+Br2(aq)→CH2BrCH2OH

3) Alkene also undergoes polymerization.

4) Reflux and related apparatus will be discussed later.

5) The order of reactivity is always RI>RBr>RCl>>RF (R can by alkyl or hydrogen) because of the stability of halide ions. HF usually does not react.

6) The reactivity of alcohols are given by 3º>2º>1º since the more alkyl group attached, the more stable the alkyl ion.


Saturday, 21 May 2011

Nomenclature and physical properties of some functional groups

I'm far too lazy to copy out those pictures. Will appear on doc. ver.


Nomenclature

Functional group

Example

Preference as suffix

Carboxylic acid

RCOOH

Propanoic acid

Prefix

Suffix

------

-oic acid

Ester

RCOOR'

Ethyl ethanoate

------

-oate

Amide

RCONH2

Propanamide

------

-amide

Aldehyde

RCHO


Methanal

(Formaldehyde)

Oxo-

-al

Ketone

RCOR1

Penta-3-one

Oxo-

-one

Alcohol

ROH

Butan-1-ol

Hydroxy-

-ol

Amine

RNH2

Propan-1-amine

Amino-

-amine

Alkene

C=C

Hex-3-ene

-----

-en-

Note:

1) In HKDSE we focus on non-substituted amine and amide, so they are primary.

2) Naming ester: the part -OR1 is names by –yl while R is named by –oate. For the above example both substituent is ethyl group so it's ethyl ethanoate.

3) The functional group with higher position in the table means it has a high preference as a suffix. For example when a multifunctional compound contains amide and alcohol, say HOCH2CONH2, amide is the suffix, so it is hydroxyethanamide.

4) Some functional group must exist in the terminal of carbon chain like carboxylic acid, amide and aldehyde, some of them must be in the middle, like ester and ketone.

5) The =O actually refers to a carbonyl group, so carboxylic acid is a combination between carbonyl and hydroxyl group, and amide is the combination between carbonyl and amide group.

The standard form of nomenclature:

Geometrical configuration – Prefix – Parent chain – Unsaturated Form – Suffix

1) Prefix: The functional groups with less preference are arranged here in alphabetical order, like 2-bromo-3-chloro….

2) Parent chain is the longest continuous carbon chain containing function group. The chain with the functional group in suffix is chosen. If there're more than one possible choices, we choose the one with double bond. (We do not discuss the peroxide related function group here.)

3) Unsaturated form: double bond is represented by –en-, so if there're two double bond the unsaturated form is –dien-

4) Suffix: the function group with highest preference.

5) Number assignment must be assigned as 1 at one end of the chain; the number of the functional group at the suffix must be minimized. e.g. it's propan-1-ol instead of propan-3-ol. Also, number assignment is needed only if it is not unique. For example, HOCH2CONH2, it is hydroxyethanamide but not 2-hydroxyethanamide since the first carbon already have four bonds with non-hydride substituent so it must be on the second carbon.

Physical properties

(Note: ID-ID refers to instantaneous dipole-induced dipole attraction, PD-ID refers to permanent dipole-induced dipole attraction, PD-PD refers to permanent dipole-permanent dipole attraction, HB refers to hydrogen bond, r.t. refers to room temperature.)

Functional group

Boiling point

Solubility in water

R (alkane/alkene)

Low since it's non-polar, only ID-ID exist

Insoluble since it's non-polar

RX

Moderate, PD-PD (RX----RX), haloethane is liquid in r.t..

Slightly soluble due to PD-PD between RX and H2O

ROH

High since HB exist (ROH----O in ROH), MeOH is already liquid in r.t..

High due to HB with H2O, MeOH to PrOH is miscible with water at all proportion.

RCHO/RCOR1

Moderate, PD-PD exist between O and the carbon connected to O.

High, HB with H2O, ethanal and propanone is miscible with water at all proportion.

RCOOH

Very high due to dimer formed doubled the size and the intermolecular force.

Very high due to extensive HB with H2O, the first four RCOOH is miscible with water at all proportions.

RCOOR1

High due to PD-PD between C and O, similar to ketone with similar molecular size, note that no HB formed because no H atom is attached to O.

High since it forms HB with H2O.

RCONH2

Even higher than RCOOH since much more HB can be formed.

Very high due to HB formed with H2O

RNH2

Higher than RX, PD-PD between N and H, but N-H is less polar than O-H.

High due to HB with H2O

Note: the general trend is given by:

1) Boiling point increases as molecular size increase due to increase in intermolecular forces.

2) Solubility decrease as molecular size increase, carbon compound with very long chain must be insoluble in water no matter what functional groups they have.

Tuesday, 17 May 2011

LCM and GCD analysis

Recall:
Fundamental theorem of arithemetics:
Every positive integers > 1 can be written in unique product of primes.

Starting from the fundamental:
Assume:
x = p_1 ^ (x_1) * p_2 ^ (x_2) *... p_n ^ (x_n)
y = p_k ^ (y_k) * p_(k+1) ^ (y_(k+1)) * ... p_z ^ (y_z)

This is the prime factorization to two positive integers x and y, where 1 =< k =< n+1 =< z.

Define sequence a_r = max(x_r, y_r) and b_r = min (x_r, y_r),
Now we say the greatest common divisor gcd(x,y), or simply (x,y), is given by:
(x,y) = p_k^(b_k) * .... * p_n ^(b_k)
If k = n+1, i.e., they don't have common prime divisors, (x,y) = 1, we can x and y is co-prime to each other.

Define the least common multiple lcm[x,y], or simply [x,y], given by
[x,y] = p_1 ^ (a_1) * ... * p_z ^(a_z).

Now we make some notation:
x = w_x * k_xy
y = w_y * k_xy
w_i are co-prime each other.
[x,y] = w_x * w_y * k_xy
(x,y) = k_xy
You can find that xy = [x,y](x,y).

Simplify this once more: when we prime factorize all elements into co-prime factors, the lcm and gcd function have made it as cyclic function.
Denote the product of all w_i = k_1
The product of all k_ab (gcd between two elements) = k_2
The product of all k_abc (gcd between three elements) = k_3, etc.

Then we can generalize that the lcm all n elements = product of all k_i while the gcd = k_n.

Now let's generalize our result to 3 elements.

Lemma : (b,c) / (a,b,c) = k_bc, it can be solved by set theory.
(b,c) = b ∩ c, (a,b,c) = a ∩ b ∩ c
Then (b,c)/(a,b,c) = (b∩c) / (a∩b∩c) = (b∩c)/a, which is "common factor of b and c but NOT a".

Is the identities xy = [x,y](x,y) applicable to 3 elements? Let see:
Using the notation {a_1, a_2, ...a_n} = k_1 ^(a_1) * k_2^(a_2) *... * k_n^(a_n)
abc = {1,2,3}
[a,b,c] = {1,1,1}
(a,b,c) = {0,0,1}
cyclic product of [a,b] = {2,3,3}
cyclic product of (a,b) = {0,1,3}
abc is certainly unequal to [a,b,c](a,b,c)
However we can see the identity that abc[a,b,c] = [a,b][b,c][c,a](a,b,c).

Let's have a classical NT problem:
Prove the identity [a,b,c]^2(a,b)(b,c)(c,a) = (a,b,c)^2[a,b][b,c][c,a]

It can be proved very easily by degree analysis:
Power to the notation = multiply the number in the notation
LHS = {1,1,1}^2{0,1,3} = {2,3,5}
RHS = {0,0,1}^2{2,3,3} = {2,3,5}
So it's true.

How can we solve this by means of prime factorizing?

Note that cyc. prod. of [a,b] = (abc)^2 / cyc. prod. of (a,b)

Also note the pemuability of the gcd and lcm function: [a,b,c] = [[a,b],c] and (a,b,c) = ((a,b),c)
[a,b,c] = [[a,b],c] = [a,b]c/([a,b],c) = abc/([a,b],c)(a,b)

[a,b,c]^2(a,b)(b,c)(c,a) = (a,b,c)^2[a,b][b,c][c,a]

<=>
(abc)^2(a,b)^2(b,c)^2(c,a)^2 = (a,b,c)^2(abc)^2([a,b],c)^2(a,b)^2

<=>
(b,c)^2 (c,a)^2 = (a,b,c)^2 ([a,b],c)^2

Now we use prime factorizing method:

k_bc ^2  k_ac ^2 k_3 ^2 = (w_a*w_b*k_ab*k_ac*k_bc*k_abc, w_c*k_ac*k_bc*k_abc)^2
=k_bc ^2  k_ac ^2 k_3 ^2

Or, bet set theory on ([a,b],c):
(a U b) ∩ c
= (a∩c) U (b∩c)
=> k_ac, k_bc and k_abc

Q.E.D..

Exercise:
1) Generalize the cases of n numbers

Economics: the macroeconomic problems (cont.)

When the actual change in price level differs from expected, there will be a redistributive effect between providers and recipients of fixed future payments.

- Anticipated change in price level is expected (correctly).

- Unanticipated change in price level is unexpected or expected incorrectly.

- Under inflation, providers of fixed future payments (borrower) gain while the recipients (lender) lose. It’s because the interest rate of fixed future payment is bonded by expected inflation rate. When unanticipated inflation exist, the value of returning sum is less than expected in real terms (ia > ie, ra = n - ia < n - ie = re).

- Oppositely, under deflation, providers of fixed future payments (borrower) lose while the recipients (lender) gain.

Other effects of inflation

1) Increase in cost of livings, so for given income the standard of living may fall.

2) Resource allocation due to redistribution effect or investment in goods which have a higher rise in nominal price.

3) Effect on GDP: since the cost of consuming in the future is raised, C↑ and savings↓, also NX fall.

Employment problem

Labour force refers to people that are able and willing to work, aged 15 or above.

Employed person is the labour force that works for profit/ with a formal job attachment, including part-time/underemployed workers, employers, unpaid family members (like housewife) and those who are temporarily absent for work (sick leave / strike)

Underemployed workers are those employed persons who involuntarily work less than a specified number of working hour (35 hrs in HK).

Unemployed persons are able but failed to find a work.

Underemployment or unemployment rate = underemployed persons or unemployed persons / Labour force * 100%.

Costs of unemployment include lower living standard, family problems to individuals; financial burden to government; loss of output to society and other social problems as well.

Note: unemployment is not purely bad to the society. Due to frictional unemployment, some lose their work and find a new one, this may give a rise in productivity.

Business cycles

This refers to the short run cyclical fluctuations in growth rate of real GDP around the long run trend.

1) Recession / contraction: real GDP drops continuously, unemployment rate is increasing.

2) Trough: lowest point in the business cycle where the unemployment rate is at highest.

3) Recovery / expansion: real GDP rises continuously, unemployment rate is decreasing.

4) Peak / prosperity / boom: highest point in business cycle where unemployment rate is at lowest.

Note:

1) There are different definitions to the business cycles: (1) Trough may refer to negative real GDP growth only; (2) Recovery and recession may refer to two consecutive growth / fall in growth rate in real GDP.

2) The period and magnitude of each cycle may not be the same, it’s only a trend.

*Starting from "other effects of inflation" it's new since the mid-term.

Monday, 16 May 2011

Economics: Fiscal Policy

Fiscal policy: achieve economic goals by adjusting government revenue and expenditure

Tax: principle of taxation includes:

1) Equity / ability-to-pay: tax accords to their abilities of pay like taxable income. So those taxes should be proportional or progressive.

2) Certainty: The tax payer should know clearly about the amount of tax/payment methods.

3) Convenience: The process of paying tax should not impose extra cost to tax payers.

4) Economy: The administrative cost of collecting tax should be minimized and smaller than tax collected. For example in HK employers have to report employee’s salaries/pensions to reduce cost of calculating tax and avoid tax evasion.

Classification of tax: the two classification method

1) Direct tax: taxpayer can’t shift the tax burden to others, usually tax levied on wealth.

2) Indirect tax: taxpayer can shift the tax burden to others, usually tax levied on goods/services.

Formulae about calculating tax:

Taxable income = Total income – tax allowance

Avg. tax rate = total tax / total taxable income

Marginal tax rate = additional tax/additional income.

1) Progressive tax: tax rate increase with taxable income; graph of tax-taxable income is concave. Examples: salaries tax in HK (first $40k: 2%, next $40k: 7%, next $40k: 12%, Reminder: 17%)

2) Proportional tax: tax rate is constant; graph of tax-taxable income is a straight line. Examples: profit tax and property tax in HK.

3) Progressive tax: tax rate increase with taxable income; graph of tax-taxable income is concave. Examples: Air passenger departure tax and tax on luxury goods (since tax is given per goods, independent of the taxable income)

Tax in HK

1) Direct tax: Salaries tax, property tax and profit tax

2) Indirect tax: stamp duty; bets and sweeps tax; general rates and duties

Effects on P and Y by fiscal policy:

The concerns include stabilizing price level (like lower P during inflation), employment level (like eliminating deflationary output gap to reduce unemployment problem), stimulating economic performance (Yf) and narrowing income inequality.

1) By direct tax: direct tax ↑/↓ → disposable income ↓/↑ → C/I ↓/↑ → AD ↓/↑. So we can eliminate deflationary output gap by cutting direct taxes (inflation occurred), or eliminating inflationary output gap by raising direct taxes (deflation occurred).

2) By government expenditure: G↑/↓ → AD ↑/↓, so we can control AD by government expenditure as well.

3) By [general] indirect tax like general sales tax: tax ↑/↓ → MC ↑/↓ → SRAS ↑/↓. We can eliminate deflationary output gap by cutting direct taxes (but deflation occurred), or eliminating inflationary output gap by raising direct taxes (inflation occurred).

4) To increase Yr we reduce specified direct taxes or increase government expenditure that aims to increase in LRAS. For example we can increase government expenditure in education that increases AD and LRAS together, then Yf is increased (with no significant change in P).

5) Eliminate a demand-pull inflation by raising direct tax and eliminate cost-push inflation by cut indirect tax, in order to stabilize P.

6) Increase the progressivity of direct tax to narrow income inequality.

Advantage of direct tax:

1) Effects on price level: direct tax↑ → P↓ so it relieves inflationary pressure, but indirect tax ↑ → P↓, so it puts inflationary pressure in the economy.

2) Direct tax narrows income inequality since it’s usually proportional/progressive, but indirect tax widens the income inequality since it’s usually regressive.

Advantage of indirect tax:

1) More stable income to government since it’s less relating to taxable income, so as the economic prospects.

2) Less disincentive effect on work/investment than direct tax since indirect tax don’t reduce their income from work directly.

3) Less tax avoidance/evasion since it’s “packed” in the goods or services.

Government expenditure in fiscal budget refers to transfer payment + government departmental expenditure (consumption expenditure G + investment expenditure I). Currently most government expenditure is spent on education sector.

Budget: statement of estimation in government revenue and expenditure. For example, surplus budget implies estimated revenue > estimated expenditure.

Fiscal: the actual government revenue/expenditure, like fiscal balance means actual revenue = actual expenditure and fiscal deficit is actual revenue < actual expenditure.

Expansionary fiscal policy aims to raise Y in short run by increasing government expenditure or reducing revenue.

Contractionary fiscal policy aims to reduce Y in short run by reducing government expenditure or increasing revenue.

Another classification refers to recurrent expenditure (regular, like salaries) and capital expenditure (like infrastructure)

The net effect by increasing the same amount of government expenditure and revenue is expansionary under the assumption of existence of saving habit.

When an amount of tax X is collected, the disposable income in the economy dropped less than $X since they have taken part of their savings for the tax. So the AD is reduced by less than $X. When all of this revenues is used as expenditure, SRAS increased by $X. So SRAS shifts more than AD and it’s slightly expansionary.

As a result, balanced and deficit budget is expansionary while surplus budget can be expansionary, neutral or contractionary.

Public sector can be used to measure the proportional of government expenditure:

Public sector = government expenditure / GDP * 100%.

Osu! - Demetori - Jehovah's YaHVeH Single Hand

http://osu.ppy.sh/b/45895&m=1

I seldom post Osu!-related stuffs here but this is really an exceptional case.
Where I passed Demetori - Jehovah's YaHVeH by single hand.

Though I am #78 only, but I think I'm the first to complete this by single hand lol

Replay:
http://puu.sh/24p2

Chris
16/5/2011

Sunday, 15 May 2011

Economics : AD-AS model

AD-AS model

Aggregate output of an economy is the total value of output at constant market prices, so it’s measured by the real GDP = C + I + G + NX

Aggregate demand (AD) = the relationship of aggregate quantity demanded AQd against different price level P. It’s downward slopping due to three reasons:

1) Wealth effect: P↑→Real wealth of people↓→C↓→AQd↓

2) Interest rate effect: P↑→People tends to save less and more borrowing (since cost of living↑)→ir↑→C, I↓→AQd↓

3) Foreign price (real exchange rate) effect: P↑→Local good becomes relatively more expansive than foreign goods→NX↓→AQd↓

Same as the D-S model, change in price level does not change the AD but AQd only.

Change in AD is related with:

1) C: economic prospects, disposable income, tax/allowances, i% and saving habits

2) I: i%, economic prospects, (profit) tax rates and technological level

3) G: government revenue and expenditure

4) NX: foreign price level, exchange rates and trading policies

Aggregate supply is the relationship between aggregate quantity supplied AQs against the price level. There’re two types of AS: short and long run.

Short run: the period that producers haven’t fully recognized and make adjustments to the change in economic conditions. This is due to imperfect market information and high adjustment cost (e.g. the signed contract)

Long run: the period that producers have fully recognized and make adjustments.

SRAS is upward slopping because:

1) Sticky-cost (wage) effect: The input prices are usually fixed during a short period under the same contract. When P↑, output price rises more than input prices, so it’s more profitable to produce more, so AQs↑.

2) Misperception effect: When P↑, it’s considered as rising of real income instead of nominal income, so it produces more and AQs↑.

LRAS is a vertical line at the full-employed output (Yf) since there’s no sticky-cost and misperception effect. When cost and price is completely flexible, the aggregate output stays at Yf as it is the maximum sustainable output in the economy. The production decisions are not affected by the change in P, so it’s vertical at Yf, and is independent of P.

- Yf is not the maximum possible output, but the economy is not sustainable beyond Yf (for example, workers works OT, but this is not sustainable as their body is damaged), and the resources are not fully utilized before Yf.

- Practically SRAS is relatively gentle before Yf and steep beyond it because extracting unused resources (like reliving unemployment) is easier than extracting resources from a fully utilized economy.

Change in SRAS:

1) MC of (all) firms ↑/↓→supply price per good ↑/↓→SRAS↓/↑

2) Expecting (not actual) ↑/↓ in price level → workers’ misperception in ↓/↑ of their real wages and producers’ misperception in ↓/↑ of their revenue → ↓/↑ their production → SRAS ↓/↑

3) Supply shock about factors of production (e.g. labour strike and transportation delay)

4) (Indirect) tax / subsidies → SRAS ↓/↑

LRAS is only affected by the quality or quantity of factors of production.

Short-run equilibrium: In short run the equilibrium AQ and P is decided by the intersection between AD and SRAS, where AQd=AQs.

Long-run equilibrium: In long run the equilibrium AQ and P is decided by the intersection between AD and LRAS, where Yd = Yf, independent of P.

Similar to D-S model, surplus (AQs > AQd) decreases P until Pe and in shortage (AQs < AQd) increases P until Pe, so the equilibrium is reached.

Inflationary and deflationary output gap

These case occurs when short-run equilibrium and long-run equilibrium does not intersect at the same point.

For deflationary output gap, AQSR < Yr, it follows that not all resources are utilized, then there’s unemployment in factors of production, then MC of those factor decreases, causing SRAS shift to the right until short and long run equilibrium is attained at the same time. In this case, P↓ and Y↑.

For inflationary output gap, AQSR > Yf, then there’s shortage in factors of production, causing MC of factors of production increase, so SRAS shift to the left until short and long run equilibrium is attained at the same time. In this case, P↑ and Y↓.

Change in AD

AD↑/↓ → inflationary/deflationary gap occurs → P and AD ↑/↓ in SR → in LR SRAS ↓/↑ → P↑/↓ and AD back to Yf.

In overall a two-step inflation/deflation occur and the AD changes and back to Yf

Change in AS:

When AS shifts, in short-run, inflationary (SRAS↑) or deflationary (SRAS↓) output gap appears. In long run, the SRAS shifts back to its original places. In short run, P↓(SRAS↑) or P↑ (SRAS↓) and Ye↑(SRAS↑) or Ye↓(SRAS↓).

In some cases more than one curve is shifted. For example, importing talents may increase AD (consumption) and LRAS (quality and quantity of labour).

Consider the LR equilibrium, if AD increases, there’s a increase in P. If LRAS increases, Y increases while P decreases. Under the assumption of parallel shift, the curve with larger shift dominants the net effect in P and Y.

For example, when AD and LRAS increases:

1) AD↑ > LRAS↑: P↑ and Y↑

2) AD↑ = LRAS↑: P is unchanged and Y↑

3) AD↑ < LRAS↑: P↓ and Y↑

For more complicated case (all 3 curves is moved at the same time), their short run effect is sometimes uncertain because the magnitude of shifting in a definite time in short run is unknown. Consider this example:

“A lot of foreign labour left a economy. If the shift of LRAS = shift of AD, find the change in P and Y in short and long run.

Long run: consider the long-run equilibrium, since the shift of LRAS and AD is equal, so P is unchanged while Y is decreased.

Short run: Y decreases, but P is uncertain as it can be any point in the rhombus.

Saturday, 14 May 2011

反思拉普拉斯的模型及網絡舉証作弊

「對此……本案的立證已經完成。也就是說,沒有其他的可能性了。」
「哼哼……哈哈哈哈。」犯人席上傳來一陣不屑的笑聲。
「嗯?」
「非常抱歉,你的立証似乎還差了一件事,那就是決定性的證據。」
「可、可是!那直播已經顯示出他根本不可能全連!那作案的動機也就很明顯了!」
「沒錯,可是你還欠一個決定性的證據。只要你不能對其作案一刻的行為立證,那本席仍不能予以斷罪。」
「可……可惡!」

===============
我相信有人會看得明上面的一段crossover。
網路審判。
說起來這也不是新鮮事了,面對一個比一個變態的變態,要說誰作弊誰沒作弊太難了吧,特別是沒有軌跡的遊戲。
單以一個動作的數據量來看是這樣的。
一個理想[ideal]的遊戲中,在沒有隨機[理想化的"絕對隨機性"如atomic noise而非一般的偽隨機]的情況下,因果論必然成立。
這是一個簡化的Laplace Demon model。

我們可以把宇宙現在的狀態視為其過去的因以及未來的果。如果一個智能知道某一刻所有自然運動的力和所有自然構成的物件的位置,假如他也能夠對這些數據進行分析,那宇宙裡最大的物體到最小的粒子的運動都會包含在一條簡單公式中。對於這智者來說沒有事物會是含糊的,而未來只會像過去般出現在他面前。

一個格鬥遊戲其身處的位置可視為方向鍵的向量總和,還有主動及被攻擊的位移總和。槍戰遊戲亦然。
位移分量與按鍵時間成正比,而按鍵時間已知。
那只要其速度不符就可視為作弊。
那Osu!又如何?
速度沒有理論上的限制[當然也遠少於光速],以(時間,x,y,z) [z: 00/01/10/11為左/右點擊]為記錄的話會成為一個4x[時間片段數]的矩陣。
如果速度沒限制的話,我們就不能以replay作為作弊的決定性證據。
於是,人為的主觀判斷就產生了。「不自然的移動」、「過於穩定的移動」變成了作弊的證據。
輕觸式打法又如何?沒有完整的軌跡,只有點擊那一下的位置有所改變……但是slider的存在仍能使軌跡存在。
太鼓呢?只有(t,h) [h為點擊]的數據,那一切的軌跡都不能存在了。
最極端的例子是click^3,一切被指過快的click都被作廢,但的確大部分人都能達到所謂的極限速度,使得個人能力在群眾作用下式微,造就了08年的三國[TW,JP, HG]爭霸,還有日本的"alpha"作弊器。

科技日新月異,遊的的作弊沒有現實的的佐證下難以識破。在不可以hack進對對方電腦的前提下這真是越來越有趣了。

Tuesday, 10 May 2011

Combinatorics (NSS core)

Combinatorics

We will try to analysis the combinatorial questions logically steps by steps here. This is a way of analyzing question, not the way to answer the question. Using this analytical method it's very easy to give out the required formula.

Definition of set

S = {a1,a2,…an}, there are n elements. We can say |S| = n.

Now we analysis the combinatorial questions by putting the "possible choice" as the elements.

Example 1: Choose one from apple, orange and banana, in how many ways you can choose?

The possible choice (S) = {Apple, orange, banana}, |S| = 3

Therefore we have 3 choice.

In the case when we choose more than one

Example 2: There're 3 coins, $1, $2 and $5 respectively. In how many ways we can choose two of them?

Since combination is not yet introduced, we use counting here.

The possible choice (S) = {$1+$2, $1+$5, $2+$5}, |S| = 3.

This is the expression when we choose more than one.

Remember, we only choose one from the set only.

Adding principle

We say "we have |A|+|B| choices when we choose one from A OR choose one from B."

Mathematically, |A|+|B| = |A+B|. We can visualize this result easily.

For example, A = {apple, orange} and B = {banana}. Choosing one from A or B would gives {apple, orange and banana}. Which gives 3 choice = 2+1.

Example 3: In a restaurant providing Chinese and Japanese dish, there're 7 Chinese and 9 Japanese dishes available. In how many ways we can choose one from it?

We have |Chinese dish| = 7, |Japanese dish| = 9, so |Chinese dish OR Japanese dish| = 7+9 which is 16.

Multiplying principle

We say "we have |A|x|B| choices when we choose one from A AND choose one from B."

Consider A = {a1,a2,…ax}, B = {b1,b2,…by}, then one from A and one from B gives S = {a1+b1,…a1+by,a2+b1,…ax+by} which gives |A| x |B|.

Example 4: In the restaurant there're 7 Chinese dishes and 4 types of soup. In how many ways we can choose one dish and one soup?

Consider |Chinese dish| = 7, |soup| = 4, we have 7*4 = 28 choices.

Full arrangement

When we arrange n elements in order, there're n! choices.

Proof: You have n choices to put the first elements, (n-1) choice to put the second elements…totally giving you 1*2*3*…*(n-1)*n = n! choices.

Example 5: In how many ways we can arrange 5 letters, "A,B,C,D,E" in order?

We have 5! = 120 choices.

Repetitions

When we arrange n elements in order, with x of them is the same (identical), number of choices is given by $n!/x!$.

Example 6: In how many ways we can arrange 5 letters, "A,B,C,C,D" in order?

We have 5!/2! = 60 choices.

Example 7: A students claims that he get 1A, 2B and 2D in HKALE. How many different possible result he/she could get in the exam?

We have two repeated elements. The number of possibility is $5!/(2! * 2!) = 30$.

Identical and different elements

Identical elements mean that the permutations are useless. For example, you can't arrange "element x, element x" in order because they are the same.

Different elements means that it makes difference when you permute them, like apple and banana.

Permutation

The standard form of combination ${}^{n}P_{r}$ is "choose r elements from n and arrange them in order"

${}^{n}P_{r}$ = $n! / (n-r)!$, we can visualize this: oooooooooxxxxxxxxxxxxxx

There're n elements, "o" is the r chosen elements and "x" is the n-r remaining elements.

Step 1) we arrange all of them in order.    : n!

Step 2) we know that the remaining elements are identical each other because we don't care their permutation.    : 1/(n-r)!

Therefore we get ${}^{n}P_{r}$ = $n!/(n-r)!$

Example 8: In how many ways we arrange 7 of 10 teachers to teach 7 classes? (test)

We have ${}^{10}P_{7}$ = 604800 ways.

Combination

The standard form of combination ${}^{n}C_{r}$ is "choose r elements from n". Since we don't need permutation, elements are identical each other. For example, choosing "apple and banana" is same as choosing "banana and apple".

${}^{n}C_{r}$ = n! / [r! (n-r)!]

Example 9: In how many ways we can choose 10 distinct balls from 12?

We have ${}^{12}C_{10}$ = 66 ways. , we can visualize this: oooooooooxxxxxxxxxxxxxx

There're n elements, "o" is the r chosen elements and "x" is the n-r remaining elements.

Step 1) we arrange all of them in order.    : n!

Step 2) we know that the remaining elements are identical each other because we don't care their permutation.    : 1/(n-r)!

Step 3) we don't care the permutation of chosen elements as well.     : 1/r!

Combining gives ${}^{n}C_{r}$ = n! / [r! (n-r)!]

One important identities is that : ${}^{n}C_{r}$ (r!) = ${}^{n}P_{r}$ we have to permute the chosen elements.

Example 10: In how many ways we arrange 7 of 10 teachers to teach 7 classes? (test)

We can first choose 7 from 10, then permute them.

Number of ways = ${}^{10}C_{7}$ * 7! = 604800.

Another identities is ${}^{n}C_{r}$ = ${}^{n}C_{n-r}$.

Mathematically they are the same and can be proved easily.

Visualizing the problem: Choosing r from n is equivalent to choosing (n-r) from n that is unwanted. So they are the same.

More complicated cases: elements and boxes

When we arrange teachers to classes, we can say "teachers" is the elements while "classes" is the boxes. In this case the classes are different each other, but sometimes they maybe the same.

Example 11:

a)       In how many ways we put 10 marbles into 5 different boxes with 2 marbles in each box?

We choose 2 from 10 in the first box, 8 from 2 in the second one and so on…

Number of ways = ${}^{10}C_{2}$ * ${}^{8}C_{2}$ * ${}^{6}C_{2}$ * ${}^{4}C_{2}$ * ${}^{2}C_{2}$ = 113400

Alternative: the elements in the boxes are identical. There are 5 boxes so 5 times of repetition of 2 elements. There are 10 elements in total.

Number of ways = $10! / (2!)^5$ = 113400

b)       The above boxes are distributed to 5 people. In how many ways the marbles can be distributed to the people?

Note that we have 2 times of permutation here. The first one is marble to box, the second one of marble to people. Number of ways = 113400 * 120 = 13608000.

c)       In how many ways we put 10 marbles into 5 identical box with 2 marbles in each box?

Consider the permutation between the 5 identical box, number of ways = 113400/5! = 945.

Example 12: There're 3 boys and 4 girls. They are going to be arranged in a row.

a)       How many ways can be arrange them if two girls must at the two ends?

b)       How many ways can be arrange them no men are standing together?

We have two ways to solve (a).

Method 1:

1)       Select the two girls and put them at the two ends = ${}^{4}C_{2}$ * 2! = 12

2)       Permute the remaining people = 5! = 120

Overall choices = 12*120 = 1440

Method 2:

1)       Arrange the boys to sit in the middle = ${}^{5}P_{3}$ = 60

2)       Permute the girls for the remaining seats = 4! = 24

Overall choice = 60 * 24 = 1440

(b)

1) We permute the girls = 4! = 24

2) Boys can only standing at the side or between the girls, that implies that they have 5 possible position (oGoGoGoGo), so we have ${}^{5}P_{3}$ = 60 choices

Overall choice = 24*60 = 1440.

Problems:

State the number of choices for the following cases:

1)       Choosing 5 girls and 4 boys from 10 boys and 10 girls.

2)       Permuting the words APPLE and BANANA.

3)       Choosing 3 girls and 5 boys from 8 boys and 8 girls and arrange them in a row for:

a)       No restriction.

b)       Two girls must be at the two ends.

c)       A particular boy must be arranged between two girls (GBG)

4)       There are 3 rows of seats. There are 4 seats per row. 6 people are sitting on some of the seats. For the number of arrangement if:

a)       No restriction

b)       A particular person must sit at the leftmost seat for any row.

c)       One of the rows has to be fully seated.

5)       There are 9 different marbles.

a)       Putting them into 3 identical boxes with 3 each.

b)       Putting them into 3 different boxes with 3 each.

c)       Putting them into 3 identical boxes with no restriction on number of marbles of each box (no marbles for a certain box is permitted).*

d)       Putting them into 3 identical boxes with no restriction on number of marbles of each box (no marbles for a certain box is NOT permitted).*

6)       N people are arranged in a circle table. Show that the number of arrangements is (N-1)!.*

Questions with * would be harder.

Friday, 6 May 2011

Physics note: Doppler effect and universe

Doppler effect

In the absorption spectrum, we see that blue shift (the spectrum lines appear at bluer side) happens when a star is approaching us. We see a red shift when it’s receding us.

When the observer and source of a wave is moving, the frequency of wave observed changes.

The new frequency is given by f’ = f(v+uo)/(v+us), where f is the original frequency, v is the velocity of wave, uo is the velocity of observer (Take the direction of source be positive) and us is the velocity of the source.

Now tweet the formula a bit: f’/f = (v+uo)/(v+us), for EM wave v = c, c/λ=f, then

λ/λ’ = 1 + Δλ/λ = (c+uo)/(c+us) = 1 + vr/(c+us) ≈ 1 + vr/(c) (since c>>us), therefore we get

Δλ/λ = vr/c

Δλ/λ is called the fractional shift in wavelength. uo-us is the relative velocity between Earth and the star, but being an observer on the Earth (which is not an inertial frame), we may imagine the star being the only moving object. vr turns to be the radial velocity (the component parallel to the line linking star and the Earth) between the star and the Earth. Considering the sign, when the star is approaching us, radial velocity is negative then there’s a negative change in wavelength, causing a blue shift.


Note that this equation is valid only if vr << c as shown in the proof. They are usually applicable for stars motion which has velocity about several kmh-1 which is far less than c.

Application

1) Expansion of a star (red giants; supernova)

When θ is small, the radius can be given by R=Dθ, ΔR = D(Δθ). ΔR = vt = |Δλ/λ|tc, then

D =ΔR/Δθ = |Δλ|tc/λΔθ. t can be measured in a year [in the same period with Δθ], also note that Δθ in arcsecond should be converted into radian.

2) Binary star system

Consider a distant star of mass m orbiting a much bigger star of mass M, assume the bigger star is at rest. The radial velocity of smaller star is periodical with period equal to orbiting period. The maximum radial velocity is equal to the orbiting speed v (it’s at maximum when the velocity point towards the Earth, it can be obtained by Doppler effect.) By obtaining the period of the radial velocity T we can calculate the orbiting radius r = v/ω = Tv/2π. Considering the centripetal force, mv2/r = GMm/r2, M = v2r/G = v3T/2πG. This helps us to estimate the mass of an unknown object in the universe since this can be applied beyond binary star system, they can be circular motion due to black hole or dark matter.

3) Existence of dark matter

Consider the galactic rotational curves (the stars in a galaxy orbits around the center of galaxy) In classical mechanics, v = (GM/r)0.5 in star orbital motion as predicted as curve A. However the real observations show that the actual curve is B, which implies that the rotational speed v is independent of radius from the center of galaxy, and we may conclude that the mass spreads outside the galaxy, and called dark matter.

Dark matter (as well as dark energy), occupies 95% of matter in the universe, and they do not interact with any known physical phenomena except gravity.

The dark matter leads to the expansion of universe, and a red shift from distant galaxy is observed. The more distant galaxy, the faster recession velocity.

Hubble’s law states that the recession velocity of a galaxy is directly proportional to its distance. Mathematically, v = Hd, where recession velocity is measured in km s-1, d is measured in Mpc and H is the Hubble constant = 73.5 km s-1 Mpc-1.

Note:

1) 73.5 is an approximated value. Up to now this constant are not precisely measured and have a percentage error of 3%.

2) This applies to distant and large enough galaxies only. Otherwise the recession velocity can’t dominant from gravitational pull between galaxies. For example, some small galaxies approach Milky Way Galaxy under gravitational pull.

Thursday, 5 May 2011

Physics: Stars and universe I

Stars and universe

Parallax determining the stellar distance


Taking photos towards a distant star in the time difference of 6 months (then the Earth is in the opposite side on the orbit) would make a observable parallax. Assuming the more distant stars as "fixed", and the stellar distance is d.

By trigonometry we get (1AU)/(tan p) = d.

The angle p is extremely small (less than 1'' = 1º/3600), tan p is approximately equals to p in radian.

One parsec (pc) is defined as the distance between Sun and the star whose parallax is 1 pc.

1pc = 1AU/1'' ≈ 2*105AU or 3.26 ly.

Now we can simplify the equation into d = 1/p, where d is measured by pc, p is measured by arcsecond (1'').

Note that the closest star from sun is more than 1pc from sun, so the parallax is usually smaller than 1''.

The stellar size D = dθ where D is the stellar diameter and θ is the angular diameter.

Stellar Magnitude

Each magnitude represents a difference of 1001/5 times in brightness, the lower the magnitude the brighter the star. For example, a star of magnitude 1 is 10 times brighter than a star of magnitude 6.

Apparent magnitude is the brightness of celestial body as observed from Earth. (In this case, Sun is the brightest with apparent magnitude -26.7)

Absolute magnitude is the brightness of celestial body if they are 10pc from Earth. Then this magnitude is independent of its distance, only depending on its brightness. (For example, the apparent magnitude of Sun is smaller than Sirius because Sun is much closer to Earth, but Sirius has a lower absolute magnitude than Sun.)

The brightness of a planet varies due of the position for reflection. The period of variation can be a hint of orbital motion of the planet.

Stellar Spectrum


Assuming stellar body as ideal black body, they emit EM waves as T > 0K.

1) They emit EM waves with all range of frequency, but there's a peak for a specified frequency.

2) The higher of its surface temperature, the higher peak frequency, while the magnitude of peak is higher too.

Stellar body has surface temperature around 2000~60000K, which corresponding to peak frequency of red and blue light, so we say hotter star is bluer while colder star is redder.

According to Harvard spectral classification the stars are classified as:

1) O (blue): 30000 – 60000 K

2) B (blue white): 10000 – 30000 K

3) A (white): 7500 – 10000K

4) F (yellowish white): 6000 – 7500 K

5) G (yellow): 5000 – 6000 K

6) K (orange): 3500 – 5000 K

7) M (red): 2000 – 3500 K ("Oh! Be A Fine Girl Kiss Me" gives the order of OBAFGKM.)

Each class is divided from 0 to 9, e.g. B0 (hotter) to B9 (colder).

By observing the spectrum of star, dark lines may be found in the continuous spectrum. They are called the absorption spectrum, they represents the elements exists in the star.

Luminosity

The radiant power of a star J (it's Wm-2) is given by the Stefan's law J = σT4, where σ is the Stefan-Boltzmann constant 5.67*10-8 Wm-2K-4.

The equation works for black body which is ideal, but its approximation is also good for stars.

The luminosity of star L is given by J(surface area) = 4πR2J = 4πR2σT4 which has unit W.

For example, the luminosity of Sun = 4π(6.69*108)2(5.67*10-8)(5780)4 = 3.85 * 1026 W.

While comparing the luminosity with Sun, we can simplify the equation to the following form:


The Hertzsprung - Russell diagram shows the spectral classes, luminosity and surface temperature of the stars. Note that the left side of the diagram shows the higher surface temperature.


1) Main sequence: They are the initial stage of a star, releasing heat through fission and fusion.

2) Red giants and supergiants: When a star (with mass quite bigger than Sun) used up its fuels for nuclear reaction, it expands as a giants with larger size, higher luminosity but lower surface temperature. They are usually located at the right-top corner in the diagram.

3) White dwarfs are the final fate of a smaller star. They are hot but dark and small.

Considering the life of a star: when its mass is smaller than the Sun, it becomes white dwarfs directly.

For bigger star they many change into red giants or supergiants, then becomes a neutron star or supernova. For stars with 3.2 times of mass of Sun, they finally become black holes. They are called black holes because their gravitational field produced is sufficiently high that even light (matter of highest speed) can't escape from it.

Consider the escape velocity c < (2GM/r)0.5, we know that the Schwarzschild radius (which the light can't escape beyond this radius) is equal to 2GM/c2. For a planet of mass equals to that of Earth, its Schwarzschild radius is only 9 mm.