### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# CRYPTOGRAPHY MATH 0209A

UCLA

GPA 3.55

### View Full Document

## 94

## 0

## Popular in Course

## Popular in Mathematics (M)

This 29 page Class Notes was uploaded by Kaylin Wehner on Friday September 4, 2015. The Class Notes belongs to MATH 0209A at University of California - Los Angeles taught by Staff in Fall. Since its upload, it has received 94 views. For similar materials see /class/177832/math-0209a-university-of-california-los-angeles in Mathematics (M) at University of California - Los Angeles.

## Similar to MATH 0209A at UCLA

## Popular in Mathematics (M)

## Reviews for CRYPTOGRAPHY

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/04/15

RC Expansion Edwards780lltal Measure April 11 2007 Let A C Zd be nite and consider the qistate Potts model with cou plings and free boundary condition no boundary condition The Hamiltonian q 2 is lsing is 7750 7 Z Jwy6crx0y 717 MI where am 6 17 7q The partition function is 2m ZE W 2 n swam lt1 7 7 121 Now consider the random cluster model with parameter q and bond weights my with partition function given by Znqu H my H Hamgt7 lt2 41 3Wwy1 ltygtwxy0 where Cw denotes the number of connected components of the bond con guration w Note that e jxlywowwil Gamay 17 6Uac yei jxly 60wgt0ypwgty l 17 pal7 if we set Pm 17 e J W Plugging this into 17 we see that aim0 H 6Ux ypw4 l 1 7 3 MI If we expand out the product7 we get 60x0ypwy H lipwy 7 ncnm MASH ltwgtygt 9 where QA denotes the set of bonds connecting points in A Each term above can be identi ed as a bond con guration where each bond is occupied if and only if it lies in Q The above sum can now be rewritten as 2 H 60x0ypwy H 1 19121 DJ 41 ww ltwgtygtwy0 The partition function 1 now becomes 2 H mam H 1 Pwy 4 7 w zywxyy1 zywwyy0 Observe that the above sum is nite and so far is simply summed over all possible bond and spin con gurations and hence we may interchange the order of summation to obtain 2 H 5amaypzy H 17PM 5 w 7 zywxyy1 zywwyy0 From 4 we see that if an is such that a bond is present when am 7 0y then the contribution to the sum is zero Similarly7 in 57 we see that if a is such that am 7 try when there is a bond present between z and y then the contribution to the sum is zero So to get rid of the 6 we introduce the constraint function NW1 AaM Add which is the indicator function of the fact that w and a are compatible in the sense that am 0y whenever w 1 and w 0 whenever am 7 0y We can now rewrite the Potts partition function as Zcr Z 2 AM H H 1 19121 ltygt3wxy1 ltygtwxy0 Now we observe that given w 2 Am W lt6 2 since the A functions forces each connected cluster of w to have the same spin and there are q possible spins We can now perform the inner sum in the penultimate display to see that in fact with pm 1 7 e J W Zlcrl lel E lel39 So this quantity is the normalization constant for three probability mea sures Potts7 random cluster7 and EdwardsPSokal7 and from now on will simply be denoted Z Explicitly7 the Potts measure assigns a spin con gu ration a the probability 1 PP E H 60w0ypmy 17 191417 m the random cluster measure assigns a bond con gurations w the probability 1 WOW E X Hlt5wxy1pzy 5wxy01 my my and the EdwardsPSokal measure assigns a spinibond con guration mad the probability 1 E x Aaw X H thawipzy 6wxy01 7 MI U ES07 w By 67 if we x an and sum 7 over all spins a then we get exactly uRcw so the marginal distribution of the bond variables is the RC model Sim ilarly7 if we x a and sum 7 over all bonds putting in 60 and erasing Aa7 4117 then we get H I 171 pmSaahay7 which by 3 is exactly up039 so the marginal distribution of the spin variables is the Potts model Now let s nd the conditional distributions Let 9a be a dummy spin observable We compute the expected value of 9a7 9a7 with free boundary conditions in A We would like to write it as a nested expectation EwEaga l Writing out 9a and expanding as before using 37 we have ltgltagtgt g 2 a Hlt0gtgltagt c7 2 H WWWPW 1 19ml 90 7 ltwgtygt Z Z Agog H 6wwwyw1pm4 6Wwy017 pgtyl 90 7 w my g E H mummy hypo 7 pm 2 Aw wga w ltmgt a 12 W Hi6 6 lt1 l EN 7 7 wxy1py ammo 7 Pay 0397 w Z w 0 Aaw my a where we have used 6 0 Aaw qc So we see that 1 lung l w TltwgtAaw q that is7 given w the conditional measure concentrates on as which are compatible with w assigning each such a probability lqc Equivalently7 given w the clusters of w are labeled 17 7 q with uniform probability Here is a quick application of this consider q 2 the lsing case Then ltUw0ygtf ZPRCW If x and y and in the same connected component of w then am Ty and the contribution of the inner sum is 1 If x and y are in different connected com ponents7 then with probability 12 so half the contributing con gurations they will be labeled the same spin7 in which case the inner sum contributes 12 Therefore the net contribution from bond con gurations with z and y in different clusters is 07 and we conclude A Law 1 may Mace H y 4 gt907 Ml Comimw 03W C WW CM M W mm 5MQM W ltCMA46MJ B BMcML maMQOO A bMB CAM D W 8CA W WACM 6 m ueemg aw mama m CM C D3 c38 Ewe 3CAOQ 9mg Cgmg a4 0mm Wiw 04042 WaQxfa W W QgtW XMMQaV OR owl ON WW4 A WW4 mm W o eni am 0W8 Lg garaka a Wc w rw Ov owto cij Wik rat orx SW ABiQEA MA OVXJORA ABOrX Goa War 400 0rXAB Mow WWW 43quot Mama6L GEXOV u ORX Rr Wad 090k Rr W 13320 ng WWMIW So RB JW 1W QVQY c QQWamcgQ CBA e L Ma 8P 4 m ABCP Q B b A ACB39 MOW 43cmch and 4923945 so 0amp1 W44 ABCP awe W5 WM W on A Aus m PEAQltBAC aPCBC 3 W WPBg W W PC M AP 5 43 am 149sz W checwm WM 052 PCsBCdgo 4 e CWM 5 6 r 830 A32 03 Wm mum 3AB14E 90 J A as 31 05 a 2 Z mm W WAUmdBM mwwwa amd AM BM ve Ozpobwh WJ AMOVLOI 5M CQlt WW SQM m MW QW6VJWltMOL 90 mm cc W Humew mm 0Q nu md bawxse AAOB SOUL HM PQLWFJL Wtewm w 4 MW mam Hum WM 40400 ha Gad3 Mgr qumzho go AAOBCO WW1 A0103 WWUk mmmoa a LAB WM CClLAB quotWm ABC choo WW WWW 40mg qoj AOQB4OampAcwlt1 A cm em m AachJCCxecac m1 gamma 3 5 NW C to V iarezwmm A Mme 3 6L A W Hm M5qu 355 m aw Ms M Ma MM W WW 2 W A0206 Mal wt0 OHMJ 4AB 4 GQ So 40A840Y Agt M A0 QtZJ Mial5 lt10 l962 M01 350 ENE pWS Hue1m 3mm HAIA M WWII Glad I AOBk fafi 7an 139 7L M lt A 90 Ma ems m am A 330 i a b abley a 53 AC0 WU B093 LbL1 0 WC A6C QLq f gab14 EFL9 Iquot a2l L31 W11 m M W e wcmxjm 042m QM ngm W6 kag g W WM Q5 BtuCat 392er Momb4015 Lang QM a X oG man am A Mind 1 WOO minL am a w m WSQQWWHWT m MMQM AB wmxeocw m WoeWMMxCAWVMDW WA and w wwwimm ms MTe 4 02 My W 122 CM AB CMTWVMA TM 912 give 4300 Mr or 0mm fa A kaaKo MA mwsx Cj am wL 0quot may effect 3 TICC3 WA HEM ch39lz AB R M Tmsz 94AM Mgumewmhaaq amt Mtg Abuch ABAC u A 1 641043 M AB m lt9 qu 1149 mm WQva MGM mwa hte a QMMW auo tk Eli 70 3 W W TM va mm a M 39Q W ME We Mom me mm W m WWW 3 9MW W W W m WW 39 WW woo m WW 24 9159st 1 3H mHPWMOw 9 mg W W gmqahmm 3 WWW LL 8 5 quotam 3 ELLE 8 3310 3 W 9 l 9 v pw QJV EN 3 0 3 a 1 7f WI W 1 793 LE ma a WWW 3amp5 0gp m M Ma Mam M 0M4 ova Mia g 60 mm ok37 amp o Th Gum e w W Mg1M Azimxg q j N W2 Wag WW 452ng L WxWx M m M Mamae W 00 LE 600 W wo 6274 ii Ezi Lr M W che pw W A74 VHch W W JRWale a MGM 8 1 0152 W10 0amp1 60 cup Ag 13M A iQL wha s Mala lm A I 37 q 88 1 Z maxi4 Q fwhi M 6 4 5 3914 94de 61 94111 4 M 4 24 074 4 94125 24 6 W a Ayb M 6 A5 39 61 W Mi 4 54 044 quotf039 474415 Wua Wit HAWV M v 7AM 4 0 24 we 39 V amp 37ml M1I 60 37 gt 10 5b 44 614 me L S Janc e AM 7614798 Wag 4 I1WW Hale 463614 4 lt44Ac3L1 M I ei Ma a awL aw 740 a Ma 66 3 a M We EC 4quot it MO Hl l o J Asnca gt a L Sn WADa 74 0 1 6 MCan myf 39 quot f0 day39de T1 5 ddo 5 wkam 1 umerical Analysis Image Processing Matlab Todd Wittman June 18 2008 quot2math ucaeduWittmanreu2009bootcamphtm l Numerical Analysis I The goal of numerical analysis is to solve partial differential equations PDEs on a computer I The heart of numerical analysis is discretizing a continuous function with a discrete approximation I Can you discretize the first derivative dfdx III Finite Differences Recall the definition of the derivative fl lhig whiiftx On an image we can t let h go to zero We are restricted to the pixel size so the smallest h can be is 1 pixel The approximation of the derivate is called a nite difference FonNard Difference h1 fX fx1y fxy Backward Difference h1 fx fxiy fX1y Center Difference h2 fX fx1y fx1y 2 II Finite Differences We have to be careful at the borders of the image We generally assume Neumann boundary conditions dudn0 This means the values at the border are repeated Remember Matlab lists row then column so the derivative in x is on the second subscript FonNard Difference m lengthf fx f2m m f1m Backward Difference fx f1m f11m1 III The 1D Heat Equation I dudt ddx c dudx I What happens if c is constant I Can we discretize this equation I Can we code it up in Matlab and visualize the results II The Heat Equation I Let39s write a mfile that evolves the heat equation E1 UtCuxx I We need to figure out the finite differences for ut and uxx I We also need to pick a time step dt and a stopping time T hi function u heatiequation uO c m engthu0 u0 doubleu0 subplot121 plotu0 title Original39 dt02 T50 uu0 1D Heat Equation Function fort 0dtT uixx u2m m 2u u1 1m1 u u dtcu7xx subplot122 plotu title39t39num2strt drawnow end The 2D Heat Equation I Can you extend the heat equation to 2D I So instead of a signal u we will evolve a matrix u I The 2D heat equation is bit 2 V CV14 I If c is constant isotropic diffusion we get utcAu III Anisotropic Heat Equation I What if the conductivity c is notconstant anisotropic diffusion I Write a m file that handles the case when c is a matrix I For example in the picture below we have an insulating block c0 in the middle I c1 II Now onto images I 2D numerical analysis has a neat connection to image processing I Let39s talk about image processing in Matlab now I We39ll see the heat equation come up again at the end III Reading amp Writing Images Load images with imread A imread mypicjpg Write a matrix to an image with imwrite You need to specify the format To avoid compression blurring save as bmp not jpg imwriteA 39mypicbmp 39bmp You should get used to converting to double after you load an image and converting to uint8 before you write an Image II Displaying Images I The imagesc command displays a matrix from min black to max white 000 00 0 0010 050000 0 0 0 0 0 0 The default colormap for a singlechannel matrix is jet Change to grayscale with colormap gray To convert a 3channel image to 1channel grayscale use rgngray If you want the quottruequot image colors and size use imshow imshow assumes the image is in range 0255 uint8 You can see individual pixel values by clicking on the Data Cursor icon on the figure Subplots I The subplot command divides the figure into windows subplotT0taiNumFr39ows TotalNumCos index I The index goes from left to right top to bottom raster order I For example subplot234 gets box4 in a 2x3 figure I If the numbers are all single digits we can omitthe commas subplot234 5 2D Convolution I The discrete convolution is given by Mimi flml mu 7 mi I The idea is that we have an image f and a smaller quotmaskquot g I g is generally assumed to be an odd square matrix 3x3 I To compute fgx we center g over the pixel fx do pointwise multiplication and add it up At lx 42 l gx1 99 222 8 84 4 8 5 42 5 71 7 18 8 25 9 57 Linear Filters called a linear filter C conv2fg size as f C imfilterf9 I An operation that can be written as a convolution is The matlab function for 2D convolution is conv2 Note the borders of f are a special case You can specify how to handle the borders in the input parameter The parameter same makes the result C have the same I We can do multi channel filtering with imfilter 5 Linear Filters assume the mask values sum to 1 imagescimfilterAG in 2m 3m 4m su Gaussian Blurring in 2a 3a 4a an Original masks subplot at subplot132 imagescA G fspecial39gaussian39507 I To preserve the mean gray value of the image we usually I The command fspecial allows us to build some standard subplot133 M fspecial39motion392045 imagescimfilterAM in zu 3n Au an Motion Blur Nonlinear Filters I A nonlinear filter is a neighborhood operation that cannot be written as a convolution I To use nlfilter we have to provide the name of a function to perform in the neighborhood of each pixel fun x medianx B nlfilterA3 3fun I The median filter is particular good at denoising without blurring To see this add some noise with imnoise subplot121 subplot122 B imnoiseA gaussian390005 C nlfilterB5 5fun imagescC imagescB in 2a 3a 40 an in 2a 30 40 an 5 Edge Detection I The edge function has several methods for detecting edges subplot132 subplot132 UbPIOt131 S edgeA 39sobel39 C edgeA 39canny39 ImagescA imagescS imagescC it 20 30 40 50 50 50 1D 20 30 40 50 10 20 30 4E 50 1D 20 3D 40 50 III The Gradient I The norm of the gradient is often used for edge detection Vu 1m uyz I The gradient should be small in smooth regions I The gradient should be large at edges I Complicated textures can confound gradientbased edge detection II Logicals I We can find values that satisfy certain condition by setting up a boolean statement in brackets B Agt100 amp Alt200 I B is a 01 binary matrix that has a 1 at all places where A was between 100 and 200 I The complement of this matrix would be B Alt100 Agt200 Logicals I If we want to find the pixel positions where a boolean statement is true use the find function ind findAgt100 amp Alt200 ind will be a column vector of indices where the boolean statement was true Note ind could be empty size 0 Note an index is a single number not a subscript rowcolumn Matlab reads matrices columnwise We can convert between index and subscript with ind2sub and sub2ind Note you have to pass the matrix size as input You also get indices from the min max and sort functions II Anisotropic Diffusion Evolving the heat equation on an image is called isotropic diffusion lsotropic diffusion is mathematically equivalent to Gaussian blurring The problem is that the colors are allowed to flow in all directions equally including across the edges How can we stop the diffusion at the edges u V LVii lWl Anisotropic diffusion turns real images into quotcartoonsquot 1W0 Laud M Q 9x olL W UBS gl 0 p 39 6 0L1 Rch 49x OW smd mj WWPLQ 35 033 1am m4 345me W TH wWoPYO N6 wmulweam MIX Q JJS w J6 Itsgt 30 a 2 MDOM 0amp3 Ass cat2 MOW 3 r s OM t k UTA an39b MalLL 2me Mia 0 53 l l b6 3 45 at to t to so mt ts O ods lttvrg 4 5 345 o M53 mg Lmtz v ampAi AL In W 150 M 7 0 M A L 5 Wm MALL 535 Mi mm SW 50 SOMWMM Wilda1 W I W 5 WW l ON I ig 3 Xota t9fll W m M Km 3 Wm ff mWZormuut T6 t a TlttaT tb Ntw ta tbllt ltt takN T kN we N KT WM W M o 739 wr g m W 11x45 H ta39 Lk tnth I gm at 5K ijmh wi ta Lk kDrdM ngthlW bkh kgf 0 5 ade Mae 0 io tttm 1 af EK d5 2 g LK As imam O 466 C5MbK WdLU 3 4L 1 L S me a m be So K gt us As 3 M39Mk ak aw xyamp stmm HIS I dX okv 5 I A 735Wrs ig W whim KBHKCA ML or usuawa warms w kd Tiw W s M M s k inch 5 angry8W 4A 9 aming Nabrqu lamt 54s KnstatsT fHSN so sh 135 J a wy T tun 4 tum N S LAM k x xo 2m Y Y39 1gtK39t o x t J trMbN JcLNxT 7 M 1L Y tall m a t quotW1 W M z4ugmnszjw Nofw h HWY r x aT ijnTHJ is Q kmwmtmmslyww Sfx aN Y39XbN SloTxN L and b HXT 5 Lu 1 Wg m 326 12A SYM39 quot 3 0 L MA XXVquotQR jgo At Ao tgb kgng L Wu 110 Sbs1ds Im on Obgerva tm 11C Us La 9 Lb olso MWM x m fm W mefm hm lx Aiu WM MR Wu M Mn H mm ms mm NLs u mkgvm mm w 5 iPravez w 6 S1 XJS bLsthg m dun A MAM Mifmmhwt W7 d Ys 75 XtsSo 3 A A Wm m 5 91 hamgm 4390 Am a 9Jch 00 a Y 5 X 7 Us Ne t 1 5 x ax QM 325 Diil flgagm WW 3 33 mti My W me 155 A Shm it ward MISC W mm m wfi WW DUI150 MM Wb g tha 0111 s A mlL mm g Wa Ike 04 AD Mu Mun k 34 LJc LB ra 611 not MSWlt43 M y M Lt lt Li quW OCYtt ieR M5 mm m2 xl ogtA 8 05 Y WW1 mmqujo Ms 4 Maxim 4 iv ohm 1135 1 44A MK fth at o m D KMMS 0 14 M 041ml wu WK K2 Cl mm an m 45 6 lt55 MVQL WINE 390 ou AFWtaw m

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

#### "I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.