On the scaling properties of 2d randomly stirred Navier--Stokes equation

a r X i v :n l i n /0701017v 1 [n l i n .C D ] 9 J a n 2007

On the scaling properties of 2d randomly stirred Navier–Stokes equation

Andrea Mazzino ?

Department of Physics,University of Genova,and INFN,CNISM,Genova Section,Via Dodecaneso 33,I–16146Genova,Italy,

Paolo Muratore-Ginanneschi ?

Department of Mathematics and Statistics,University of Helsinki,P.O.Box 4,00014Helsinki,Finland,

Stefano Musacchio ?

Department of Physics of Complex Systems Weizmann Institute of Science Rehovot 76100,Israel

(Dated:February 8,2008)

We inquire the scaling properties of the 2d Navier-Stokes equation sustained by a forcing ?eld with Gaussian statistics,white-noise in time and with power-law correlation in momentum space of degree 2?2ε.This is at variance with the setting usually assumed to derive Kraichan’s classical theory.We contrast accurate numerical experiments with the di?erent predictions provided for the small εregime by Kraichnan’s double cascade theory and by renormalization group (RG)analysis.We give clear evidence that for all εKraichnan’s theory is consistent with the observed phenomenology.Our results call for a revision in the RG analysis of (2d )fully developed turbulence.

PACS numbers:PACS number(s):47.27.Te,47.27.?i,https://www.360docs.net/doc/63847726.html,

In two dimensions,the joint conservation of energy and enstrophy has relevant consequences for the Navier–Stokes equation.In 2d it is possible to prove that in the deterministic case the solution of the Cauchy prob-lem exists and is unique [20]and,very recently,that in the stochastic case [8,9,10,12,19,23]the solution is a Markov process exponentially mixing in time and ergodic with a unique invariant (steady state)measure even when the forcing acts only on two Fourier modes [22].At large Reynolds number,the 2d scaling properties also di?er from the 3d -case.A long standing hypothesis [25],very recently corroborated by numerical experiments [6,7],surmises the existence of a conformal invariance in 2d .A phenomenological theory due to Kraichnan [18]and Batchelor [2]predicts the presence of a double cascade mechanism governing the transfer of energy and enstro-phy in the limit of in?nite inertial range.Accordingly,an inverse energy cascade with spectrum characterized by a scaling exponent d E =?5/3appears for values of the wave-number k smaller than the typical scale k F of the forcing scale.For wave-numbers larger than k F a di-rect enstrophy cascade should occur.The corresponding energy spectrum scales as d E =?3+...where the dots here stand for possible logarithmic corrections.As em-phasized in [3,5]Kraichnan’s theory is encoded in three hypothesis,(i)velocity correlations are smooth at ?nite viscosity and exist in the inviscid limit even at coinciding points,(ii)Galilean invariant functions and in particular structure functions reach a steady state and (iii)no dis-sipative anomalies occur for the energy cascade.Under these hypotheses,if the forcing ?eld is homogeneous and isotropic Gaussian and time δ-correlated it is possible to derive asymptotic expressions of the three point struc-ture functions of the velocity ?eld consistent with Kraich-

nan’s predictions [3,5,21].Very strong laboratory (see [17,26]and reference therein)and numerical evidences (see e.g.[11]and references therein)support Kraichnan’s theory.However,a ?rst principle derivation of the sta-tistical properties of two dimensional turbulence is still missing.An attempt in this direction has recently been undertaken [14,15](see also [24]and [16])by applying a renormalization group improved perturbation theory (RG)([27]and [1]for review of applications to ?uid tur-bulence)to the randomly stirred Navier–Stokes equation with power law forcing.However how it will be discussed in details in the sequel,RG analysis leads to a scenario not a priori consistent with Kraichnan’s theory.The goal of the present work is to shed light on this issue.

RG starting point is the randomly stirred Navier–Stokes equation

(?t +v ·?)v α?ν0?2v α=??αP +f α?ξ0v α(1)?·v =0

where α=1,2,P is the pressure enforcing incompress-ibility and ξ0is an Eckman type coupling providing for large scale dissipation.The forcing f is a Gaussian ?eld with zero average and correlation

?f α(x ,t )f β(y ,s )?=δ(t ?s )F αβ(x ?y )

(2)

F αβ

(x ):=

d d p m ,p p d ?4+2ε

(4)

F 0is a constant specifying the amplitude of forcing ?uc-tuations and T αβ(p )is the transversal projector.The function χin (4)is slowly varying for m ?p ?M and set infra-red m and ultra-violet cut-o?s M scales for the

2

forcing.Its detailed shape does not a?ect the scaling pre-dictions of the RG.Irrespectively of the spatial dimension d ,the cumulative spectrum F αα(0)of the forcing (Ein-stein convection for repeated vector indexes)diverges for 0≤ε<2as the ultra-violet cut-o?M tends to in?nity hence providing for stirring at small spatial scales.For ε>2,F αα(0)is dominated by small wave-numbers and thus describes infra-red stirring.At ε=0,the scaling di-mensions of the

material derivative,dissipation and forc-ing in (1)coincide for a scaling dimension of the velocity ?eld d v =1in momentum units.Thus ε=0provides a marginal limit around which scaling dimensions can be perturbatively determined with the help of ultra-violet RG.The main result [14,15,16]is the existence of a non-Gaussian infra-red stable ?xed point of the RG ?ow yielding for the energy spectrum the prediction

E (k )=ε1/3

F 2/3

k 1?

k

,

k b

3

in (5)is derived from

the solution of the Callan–Symanzik equation [27]which in the present case requires scaling at ?nite εto stem from the balance of the two terms in the material deriva-tive with the forcing i.e.from the requirement of Galilean invariance alone.According to [1,14,15]composite oper-ators at small εdoes not induce any self-similarity break-ing by the infra-red scales m and k b .The conclusion is that the spectrum should scale for small εwith exponent d E =1?4ε/3as in the 3d -case [1].Such conclusion seems at variance with Kraichnan’s theory which instead suggests the occurrence of an inverse cascade at small ε.Namely under the assumptions (i),(ii),(iii)[3,4]the energy balance equation

?t +ξ0?ν0?2 ?v α(x ,t )v α(0,t )?

?

1r 3?2ε

,

m ?1?r ?M ?1(7)

S 3denotes the three point velocity longitudinal structure function and c i i =1,2two adimensional coe?cients ir-relevant for the present argument.Power counting based on (7)then predicts a d E =?5/3inverse cascade spec-trum at small εwith at most sub-leading corrections con-sistent with the RG prediction.

The currently available numerical resources permit to contrast the two apparently discordant predictions (5)and (7)with the actual Navier–Stokes phenomenology.

To attain this goal we integrated the Navier–Stokes equa-tion (1)for the vorticity ?eld (ω=?αβ?βv α)with a stan-dard,fully-dealiased pseudospectral method in a doubly periodic square domain of resolution 10242.Time evo-10-1

10-2

10

-3

10-410-510-6

10

2

10

1

1E (k )

k

FIG.1:Energy spectrum for ε=0.5and standard molecular dissipation.An inertial range with inverse energy cascade sets in for su?ciently small viscosity ν=O (10?4)(solid line).At larger viscosity the inertial range is suppressed and dissipative spectrum E ~k 1?2εis observed (dashed line).

lution was computed by means of a standard second-order Runge–Kutta scheme.We repeated our numeri-cal experiments for di?erent values of the hyperviscos-ity (?1)p +1ν0?2p v including p =1,standard viscosity as in (1),and p =4,6obtaining qualitatively identical results.The outcomes evince that for all 0≤ε≤2and su?ciently small viscosity,an inverse energy cas-cade with exponent consistent with d E =?5/3is ob-served (see Fig.1).If the viscosity increases,?nite resolution e?ects prevent the observation of an inertial range as the Kolmogorov scale becomes of the order of the infra-red dissipation scale.In such a case a dis-sipative spectrum appears with scaling exponent con-sistent with the prediction d E =1?2εdictated by the balance between forcing and dissipation (see again Fig.1).In agreement with (7),local balance scaling becomes dominant in the range 2<ε<3(see Fig.2).There,energy spectra scale with an exponent com-patible with d E =1?4ε/3.Finally,for ε>3a di-rect enstrophy cascade invades the whole inertial range.The phenomenology just described is con?rmed by the inspection of the energy and enstrophy ?uxes in the in-ertial range (see Fig.3).They are respectively de?ned

by ΠE (k )∝ k k o d 2

q

(2π)2?

?F {ω}(?q )F {(v ·?ω)}(q )?

where F denotes the Fourier transform and k o is cho-sen such that ΠE (k )and ΠZ (k )are positive quantities in the inertial range.As spectra and structure functions,?uxes highlight the existence versus εof three distinct scaling regimes the origin of which can be understood by contrasting (6)with the energy and enstrophy inputs

3

110-110

-210-310-4

10-510-610

-7

1

10-1

10

-2

S 3(r )

r

FIG.2:Third order structure function of longitudinal velocity increments S 3(r )for ?=1(squares),?=2.5(circles),?=4(triangles).When ?<2the presence of an inverse energy cascade with constant ?ux results in the scaling S 3(r )~r (solid line).When ?>3the presence of a direct enstrophy cascade with constant ?ux results in the scaling S 3(r )~r 3(dashed line).For 2

I E (k )∝ k

k o dq q ˇF v (q )and I Z (k )∝

k k o

dq q ˇF v (q ).For 0≤ε<2both I E and I Z are peaked in the ultra-violet.Since stirring occurs mainly at small spatial scales an in-verse energy cascade sets in the whole inertial range.In the range 2<ε<3the energy input becomes infra-red divergent whilst I Z is still ultra-violet divergent in the absence of cut-o?s.In this situation,the steady state is attained when the energy and enstrophy ?uxes balance scale by scale the corresponding inputs (see Fig.3).In this ε-range the energy spectrum scales in agreement with the exponent which can be extrapolated but no longer fully justi?ed using the RG.Finally,for ε>3both the energy and enstrophy inputs become peaked in the infra-red.In such a case [3,4]the right hand sides of Eq.(6)and of the analogous equation for the vorticity cor-relation admit a regular Taylor expansion for mx ?1.The hypotheses (i),(ii),(iii)thus recover S 3(x )∝r 3i.e.Kraichnan’s scaling for the direct enstrophy cascade in agreement with our numerical observations.

As far as intermittency is concerned,our numerics support normal scaling of velocity structure functions (Fig.4).Higher order vorticity structure function are compatible with a weakly anomalous scaling (Fig.5).These results provide an indirect positive test for the oc-currence of a vorticity dissipative anomaly [4].

In conclusion,our numerics fully support the validity of Kraichnan’s theory for all values of the H¨o lder expo-nent of power law forcing in 2d .RG scaling prediction is not observed in the range where it was supposed to appear.It seems to us that this in not trivially a conse-quence of low Reynolds number (O (ε1/2)for F 0=O (ε)see discussion in section 9.6.4of [13])entailed by per-turbative expansion.Instead scaling seems to be related

1

10-1

10-2

1

101

102

ΠE (k )

k

(a)

103

10

2

101

110-110-210-3

101

102

ΠE ,Z (k )

k

(b)

10

-1

10-2

10-3

10-4

101

102

ΠZ (k )

k

(c)

FIG.3:The energy ?ux ΠE (symbols)and the energy input I E (k )(thin line)for di?erent values of ?.(a)?=1;(b)?=2.5;(c)?=4.The energy input is de?ned as I E (k )∝R k 0dq q ˇF v (q )for ?<2and as I E (k )∝R

∞k dq q ˇF v (q )for ?>2.In (b)the enstrophy input,I Z (k )∝R k

0dq q 3ˇF

(q )with and the enstrophy ?ux ΠZ (k )are also plotted in order to show their balance at each inertial range scale.

to the convolution of the response ?eld with the forc-ing kernel in the Schwinger-Dyson equation [1,27]giving rise to a non-local scaling ?eld of dimension d O =?1/3independently of ε.This point however deserves more theoretical inquiry.

We are pleased to thank J.Honkonen,A.Kupiainen and P.Olla for numerous friendly and enlightening dis-cussions.Numerical simulations have been performed on the “Turbofarm”cluster at the INFN computing cen-ter in Torino. A.M.was supported by COFIN 2006N.2005027808and by CINFAI consortium,P.M.-G.by centre of excellence “Geometric Analysis and Mathemat-ical Physics”of the Academy of Finland and by FP5EU network contract HPRN-CT-2002-00300.

4

10

1

10210

3

104105110-110

-2

10

1

110

-1

S n (r )

S 2(r)

(a)

10

4

10

2

1

10-2

10-410

1

1

10

-1

10-2

S n (r )

S 2(r)

(b)

10-1310

-3

10

-11

10-910-510

-7

10-2

10-310-4

10

-5

S n (r )

S 2(r)

(c)

FIG.4:Structure function of longitudinal velocity incre-ments S 4(r )(squares)and S 6(r )(circles)vs.S 2(r ).The lines represent the non-intermittent scalings S 4(r )~S 2(r )2(solid line)and S 6(r )~S 2(r )3(dashed line).(a)?=1;(b)?=2.5;(c)?=4

?

Electronic address:mazzino@?sica.unige.it

?

Electronic address:paolo.muratore-ginanneschi@helsinki.??

Electronic address:stefano.musacchio@https://www.360docs.net/doc/63847726.html, [1]L.Ts.Adzhemyan,A.V.Antonov and A.N.Vasil′e v The

?eld theoretic renormalization group in fully developed turbulence Gordon and Breach,Amsterdam (1999).[2]G.K.Batchelor,Phys.Fluids,Supp II 12233(1969).[3]D.Bernard,Phys.Rev E 606184(1999)and

chao-dyn/9902010.

10

-1

1

10

110

2

1010

S n

(ω)

(r )

r

FIG.5:Structure function of vorticity increments S (ω)

n (r )for n =1,2,3,4(square,circles,triangles,poligons).In the inset we show the scaling exponents ζn .Here ?=4.

[4]D.Bernard,SPhT-00-039and chao-dyn/9904034.[5]D.Bernard,SPhT-00-093and cond-mat/0007106.

[6]D.Bernard,G.Bo?etta, A.Celani and G.Falkovich,

Nature Physics 2124(2006)

[7]D.Bernard,G.Bo?etta, A.Celani and G.Falkovich,

nlin.CD/0609069

[8]J.Bricmont, A.Kupiainen and R.Lefevere,J.Stat.

Phys.,100743(2000)and math-ph/9912018.[9]J.Bricmont, A.Kupiainen and R.Lefe-vere,Comm.Math.Phys.22465(2001)and

https://www.360docs.net/doc/63847726.html,/mp

on the contrary的解析

On the contrary Onthecontrary, I have not yet begun. 正好相反,我还没有开始。 https://www.360docs.net/doc/63847726.html, Onthecontrary, the instructions have been damaged. 反之,则说明已经损坏。 https://www.360docs.net/doc/63847726.html, Onthecontrary, I understand all too well. 恰恰相反,我很清楚 https://www.360docs.net/doc/63847726.html, Onthecontrary, I think this is good. ⑴我反而觉得这是好事。 https://www.360docs.net/doc/63847726.html, Onthecontrary, I have tons of things to do 正相反,我有一大堆事要做 Provided by jukuu Is likely onthecontrary I in works for you 反倒像是我在为你们工作 https://www.360docs.net/doc/63847726.html, Onthecontrary, or to buy the first good. 反之还是先买的好。 https://www.360docs.net/doc/63847726.html, Onthecontrary, it is typically american. 相反,这正是典型的美国风格。 222.35.143.196 Onthecontrary, very exciting.

恰恰相反,非常刺激。 https://www.360docs.net/doc/63847726.html, But onthecontrary, lazy. 却恰恰相反,懒洋洋的。 https://www.360docs.net/doc/63847726.html, Onthecontrary, I hate it! 恰恰相反,我不喜欢! https://www.360docs.net/doc/63847726.html, Onthecontrary, the club gathers every month. 相反,俱乐部每个月都聚会。 https://www.360docs.net/doc/63847726.html, Onthecontrary, I'm going to work harder. 我反而将更努力工作。 https://www.360docs.net/doc/63847726.html, Onthecontrary, his demeanor is easy and nonchalant. 相反,他的举止轻松而无动于衷。 https://www.360docs.net/doc/63847726.html, Too much nutrition onthecontrary can not be absorbed through skin. 太过营养了反而皮肤吸收不了. https://www.360docs.net/doc/63847726.html, Onthecontrary, I would wish for it no other way. 正相反,我正希望这样 Provided by jukuu Onthecontrary most likely pathological. 反之很有可能是病理性的。 https://www.360docs.net/doc/63847726.html, Onthecontrary, it will appear clumsy. 反之,就会显得粗笨。 https://www.360docs.net/doc/63847726.html,

交互式多模型算法仿真与分析

硕037班 刘文3110038020 2011/4/20交互式多模型仿真与分析IMM算法与GBP算法的比较,算法实现和运动目标跟踪仿真,IMM算法的特性分析 多源信息融合实验报告

交互式多模型仿真与分析 一、 算法综述 由于混合系统的结构是未知的或者随机突变的,在估计系统状态参数的同时还需要对系统的运动模式进行辨识,所以不可能通过建立起一个固定的模型对系统状态进行效果较好的估计。针对这一问题,多模型的估计方法提出通过一个模型集{}(),1,2,,j M m j r == 中不同模型的切换来匹配不同目标的运动或者同一目标不同阶段的运动,达到运动模式的实时辨识的效果。 目前主要的多模型方法包括一阶广义贝叶斯方法(BGP1),二阶广义贝叶斯方法(GPB2)以及交互式多模型方法等(IMM )。这些多模型方法的共同点是基于马尔科夫链对各自的模型集进行切换或者融合,他们的主要设计流程如下图: M={m1,m2,...mk} K 时刻输入 值的形式 图一 多模型设计方法 其中,滤波器的重初始化方式是区分不同多模型算法的主要标准。由于多模型方法都是基于一个马尔科夫链来切换与模型的,对于元素为r 的模型集{}(),1,2,,j M m j r == ,从0时刻到k 时刻,其可能的模型切换轨迹为 120,12{,,}k i i i k trace k M m m m = ,其中k i k m 表示K-1到K 时刻,模型切换到第k i 个, k i 可取1,2,,r ,即0,k trace M 总共有k r 种可能。再令1 2 1 ,,,,k k i i i i μ+ 为K+1时刻经由轨迹0,k trace M 输入到第1k i +个模型滤波器的加权系数,则输入可以表示为 0,11 2 1 12|,,,,|,,,???k k trace k k k i M k k i i i i k k i i i x x μ++=?∑ 可见轨迹0,k trace M 的复杂度直接影响到算法计算量和存储量。虽然全轨迹的

五种大数据压缩算法

?哈弗曼编码 A method for the construction of minimum-re-dundancy codes, 耿国华1数据结构1北京:高等教育出版社,2005:182—190 严蔚敏,吴伟民.数据结构(C语言版)[M].北京:清华大学出版社,1997. 冯桂,林其伟,陈东华.信息论与编码技术[M].北京:清华大学出版社,2007. 刘大有,唐海鹰,孙舒杨,等.数据结构[M].北京:高等教育出版社,2001 ?压缩实现 速度要求 为了让它(huffman.cpp)快速运行,同时不使用任何动态库,比如STL或者MFC。它压缩1M数据少于100ms(P3处理器,主频1G)。 压缩过程 压缩代码非常简单,首先用ASCII值初始化511个哈夫曼节点: CHuffmanNode nodes[511]; for(int nCount = 0; nCount < 256; nCount++) nodes[nCount].byAscii = nCount; 其次,计算在输入缓冲区数据中,每个ASCII码出现的频率: for(nCount = 0; nCount < nSrcLen; nCount++) nodes[pSrc[nCount]].nFrequency++; 然后,根据频率进行排序: qsort(nodes, 256, sizeof(CHuffmanNode), frequencyCompare); 哈夫曼树,获取每个ASCII码对应的位序列: int nNodeCount = GetHuffmanTree(nodes); 构造哈夫曼树 构造哈夫曼树非常简单,将所有的节点放到一个队列中,用一个节点替换两个频率最低的节点,新节点的频率就是这两个节点的频率之和。这样,新节点就是两个被替换节点的父

英语造句

一般过去式 时间状语:yesterday just now (刚刚) the day before three days ag0 a week ago in 1880 last month last year 1. I was in the classroom yesterday. I was not in the classroom yesterday. Were you in the classroom yesterday. 2. They went to see the film the day before. Did they go to see the film the day before. They did go to see the film the day before. 3. The man beat his wife yesterday. The man didn’t beat his wife yesterday. 4. I was a high student three years ago. 5. She became a teacher in 2009. 6. They began to study english a week ago 7. My mother brought a book from Canada last year. 8.My parents build a house to me four years ago . 9.He was husband ago. She was a cooker last mouth. My father was in the Xinjiang half a year ago. 10.My grandfather was a famer six years ago. 11.He burned in 1991

LZ77压缩算法实验报告

LZ77压缩算法实验报告 一、实验内容 使用C++编程实现LZ77压缩算法的实现。 二、实验目的 用LZ77实现文件的压缩。 三、实验环境 1、软件环境:Visual C++ 6.0 2、编程语言:C++ 四、实验原理 LZ77 算法在某种意义上又可以称为“滑动窗口压缩”,这是由于该算法将一个虚拟的,可以跟随压缩进程滑动的窗口作为术语字典,要压缩的字符串如果在该窗口中出现,则输出其出现位置和长度。使用固定大小窗口进行术语匹配,而不是在所有已经编码的信息中匹配,是因为匹配算法的时间消耗往往很多,必须限制字典的大小才能保证算法的效率;随着压缩的进程滑动字典窗口,使其中总包含最近编码过的信息,是因为对大多数信息而言,要编码的字符串往往在最近的上下文中更容易找到匹配串。 五、LZ77算法的基本流程 1、从当前压缩位置开始,考察未编码的数据,并试图在滑动窗口中找出最长的匹 配字符串,如果找到,则进行步骤2,否则进行步骤3。 2、输出三元符号组( off, len, c )。其中off 为窗口中匹

配字符串相对窗口边 界的偏移,len 为可匹配的长度,c 为下一个字符。然后将窗口向后滑动len + 1 个字符,继续步骤1。 3、输出三元符号组( 0, 0, c )。其中c 为下一个字符。然后将窗口向后滑动 len + 1 个字符,继续步骤1。 六、源程序 /********************************************************************* * * Project description: * Lz77 compression/decompression algorithm. * *********************************************************************/ #include #include #include #include #define OFFSET_CODING_LENGTH (10) #define MAX_WND_SIZE 1024 //#define MAX_WND_SIZE (1<

LZSS压缩算法实验报告

实验名称:LZSS压缩算法实验报告 一、实验内容 使用Visual 6..0 C++编程实现LZ77压缩算法。 二、实验目的 用LZSS实现文件的压缩。 三、实验原理 LZSS压缩算法是词典编码无损压缩技术的一种。LZSS压缩算法的字典模型使用了自适应的方式,也就是说,将已经编码过的信息作为字典, 四、实验环境 1、软件环境:Visual C++ 6.0 2、编程语言:C++ 五、实验代码 #include #include #include #include /* size of ring buffer */ #define N 4096 /* index for root of binary search trees */ #define NIL N /* upper limit for g_match_len. Changed from 18 to 16 for binary compatability with Microsoft COMPRESS.EXE and EXPAND.EXE #define F 18 */ #define F 16 /* encode string into position and length if match_length is greater than this: */ #define THRESHOLD 2 /* these assume little-endian CPU like Intel x86

-- need byte-swap function for big endian CPU */ #define READ_LE32(X) *(uint32_t *)(X) #define WRITE_LE32(X,Y) *(uint32_t *)(X) = (Y) /* this assumes sizeof(long)==4 */ typedef unsigned long uint32_t; /* text (input) size counter, code (output) size counter, and counter for reporting progress every 1K bytes */ static unsigned long g_text_size, g_code_size, g_print_count; /* ring buffer of size N, with extra F-1 bytes to facilitate string comparison */ static unsigned char g_ring_buffer[N + F - 1]; /* position and length of longest match; set by insert_node() */ static unsigned g_match_pos, g_match_len; /* left & right children & parent -- these constitute binary search tree */ static unsigned g_left_child[N + 1], g_right_child[N + 257], g_parent[N + 1]; /* input & output files */ static FILE *g_infile, *g_outfile; /***************************************************************************** initialize trees *****************************************************************************/ static void init_tree(void) { unsigned i; /* For i = 0 to N - 1, g_right_child[i] and g_left_child[i] will be the right and left children of node i. These nodes need not be initialized. Also, g_parent[i] is the parent of node i. These are initialized to NIL (= N), which stands for 'not used.' For i = 0 to 255, g_right_child[N + i + 1] is the root of the tree for strings that begin with character i. These are initialized to NIL. Note there are 256 trees. */ for(i = N + 1; i <= N + 256; i++) g_right_child[i] = NIL; for(i = 0; i < N; i++) g_parent[i] = NIL; } /***************************************************************************** Inserts string of length F, g_ring_buffer[r..r+F-1], into one of the trees (g_ring_buffer[r]'th tree) and returns the longest-match position and length via the global variables g_match_pos and g_match_len. If g_match_len = F, then removes the old node in favor of the new one, because the old one will be deleted sooner.

学生造句--Unit 1

●I wonder if it’s because I have been at school for so long that I’ve grown so crazy about going home. ●It is because she wasn’t well that she fell far behind her classmates this semester. ●I can well remember that there was a time when I took it for granted that friends should do everything for me. ●In order to make a difference to society, they spent almost all of their spare time in raising money for the charity. ●It’s no pleasure eating at school any longer because the food is not so tasty as that at home. ●He happened to be hit by a new idea when he was walking along the riverbank. ●I wonder if I can cope with stressful situations in life independently. ●It is because I take things for granted that I make so many mistakes. ●The treasure is so rare that a growing number of people are looking for it. ●He picks on the weak mn in order that we may pay attention to him. ●It’s no pleasure being disturbed whena I settle down to my work. ●I can well remember that when I was a child, I always made mistakes on purpose for fun. ●It’s no pleasure accompany her hanging out on the street on such a rainy day. ●I can well remember that there was a time when I threw my whole self into study in order to live up to my parents’ expectation and enter my dream university. ●I can well remember that she stuck with me all the time and helped me regain my confidence during my tough time five years ago. ●It is because he makes it a priority to study that he always gets good grades. ●I wonder if we should abandon this idea because there is no point in doing so. ●I wonder if it was because I ate ice-cream that I had an upset student this morning. ●It is because she refused to die that she became incredibly successful. ●She is so considerate that many of us turn to her for comfort. ●I can well remember that once I underestimated the power of words and hurt my friend. ●He works extremely hard in order to live up to his expectations. ●I happened to see a butterfly settle on the beautiful flower. ●It’s no pleasure making fun of others. ●It was the first time in the new semester that I had burned the midnight oil to study. ●It’s no pleasure taking everything into account when you long to have the relaxing life. ●I wonder if it was because he abandoned himself to despair that he was killed in a car accident when he was driving. ●Jack is always picking on younger children in order to show off his power. ●It is because he always burns the midnight oil that he oversleeps sometimes. ●I happened to find some pictures to do with my grandfather when I was going through the drawer. ●It was because I didn’t dare look at the failure face to face that I failed again. ●I tell my friend that failure is not scary in order that she can rebound from failure. ●I throw my whole self to study in order to pass the final exam. ●It was the first time that I had made a speech in public and enjoyed the thunder of applause. ●Alice happened to be on the street when a UFO landed right in front of her. ●It was the first time that I had kept myself open and talked sincerely with my parents. ●It was a beautiful sunny day. The weather was so comfortable that I settled myself into the

多媒体数据压缩实验报告

多媒体数据压缩实验报告 篇一:多媒体实验报告_文件压缩 课程设计报告 实验题目:文件压缩程序 姓名:指导教师:学院:计算机学院专业:计算机科学与技术学号: 提交报告时间:20年月日 四川大学 一,需求分析: 有两种形式的重复存在于计算机数据中,文件压缩程序就是对这两种重复进行了压 缩。 一种是短语形式的重复,即三个字节以上的重复,对于这种重复,压缩程序用两个数字:1.重复位置距当前压缩位置的距离;2.重复的长度,来表示这个重复,假设这两个数字各占一个字节,于是数据便得到了压缩。 第二种重复为单字节的重复,一个字节只有256种可能的取值,所以这种重复是必然的。给 256 种字节取值重新编码,使出现较多的字节使用较短的编码,出现较少的字节使用较长的编码,这样一来,变短的字节相对于变长的字节更多,文件的总长度就会减少,并且,字节使用比例越不均

匀,压缩比例就越大。 编码式压缩必须在短语式压缩之后进行,因为编码式压缩后,原先八位二进制值的字节就被破坏了,这样文件中短语式重复的倾向也会被破坏(除非先进行解码)。另外,短语式压缩后的结果:那些剩下的未被匹配的单、双字节和得到匹配的距离、长度值仍然具有取值分布不均匀性,因此,两种压缩方式的顺序不能变。 本程序设计只做了编码式压缩,采用Huffman编码进行压缩和解压缩。Huffman编码是一种可变长编码方式,是二叉树的一种特殊转化形式。编码的原理是:将使用次数多的代码转换成长度较短的代码,而使用次数少的可以使用较长的编码,并且保持编码的唯一可解性。根据 ascii 码文件中各 ascii 字符出现的频率情况创建 Huffman 树,再将各字符对应的哈夫曼编码写入文件中。同时,亦可根据对应的哈夫曼树,将哈夫曼编码文件解压成字符文件. 一、概要设计: 压缩过程的实现: 压缩过程的流程是清晰而简单的: 1. 创建 Huffman 树 2. 打开需压缩文件 3. 将需压缩文件中的每个 ascii 码对应的 huffman 编码按 bit 单位输出生成压缩文件压缩结束。

英语句子结构和造句

高中英语~词性~句子成分~语法构成 第一章节:英语句子中的词性 1.名词:n. 名词是指事物的名称,在句子中主要作主语.宾语.表语.同位语。 2.形容词;adj. 形容词是指对名词进行修饰~限定~描述~的成份,主要作定语.表语.。形容词在汉语中是(的).其标志是: ous. Al .ful .ive。. 3.动词:vt. 动词是指主语发出的一个动作,一般用来作谓语。 4.副词:adv. 副词是指表示动作发生的地点. 时间. 条件. 方式. 原因. 目的. 结果.伴随让步. 一般用来修饰动词. 形容词。副词在汉语中是(地).其标志是:ly。 5.代词:pron. 代词是指用来代替名词的词,名词所能担任的作用,代词也同样.代词主要用来作主语. 宾语. 表语. 同位语。 6.介词:prep.介词是指表示动词和名次关系的词,例如:in on at of about with for to。其特征:

介词后的动词要用—ing形式。介词加代词时,代词要用宾格。例如:give up her(him)这种形式是正确的,而give up she(he)这种形式是错误的。 7.冠词:冠词是指修饰名词,表名词泛指或特指。冠词有a an the 。 8.叹词:叹词表示一种语气。例如:OH. Ya 等 9.连词:连词是指连接两个并列的成分,这两个并列的成分可以是两个词也可以是两个句子。例如:and but or so 。 10.数词:数词是指表示数量关系词,一般分为基数词和序数词 第二章节:英语句子成分 主语:动作的发出者,一般放在动词前或句首。由名词. 代词. 数词. 不定时. 动名词. 或从句充当。 谓语:指主语发出来的动作,只能由动词充当,一般紧跟在主语后面。 宾语:指动作的承受着,一般由代词. 名词. 数词. 不定时. 动名词. 或从句充当. 介词后面的成分也叫介词宾语。 定语:只对名词起限定修饰的成分,一般由形容

数据快速压缩算法的C语言实现

价值工程 置,是一项十分有意义的工作。另外恶意代码的检测和分析是一个长期的过程,应对其新的特征和发展趋势作进一步研究,建立完善的分析库。 参考文献: [1]CNCERT/CC.https://www.360docs.net/doc/63847726.html,/publish/main/46/index.html. [2]LO R,LEVITTK,OL SSONN R.MFC:a malicious code filter [J].Computer and Security,1995,14(6):541-566. [3]KA SP ER SKY L.The evolution of technologies used to detect malicious code [M].Moscow:Kaspersky Lap,2007. [4]LC Briand,J Feng,Y Labiche.Experimenting with Genetic Algorithms and Coupling Measures to devise optimal integration test orders.Software Engineering with Computational Intelligence,Kluwer,2003. [5]Steven A.Hofmeyr,Stephanie Forrest,Anil Somayaji.Intrusion Detection using Sequences of System calls.Journal of Computer Security Vol,Jun.1998. [6]李华,刘智,覃征,张小松.基于行为分析和特征码的恶意代码检测技术[J].计算机应用研究,2011,28(3):1127-1129. [7]刘威,刘鑫,杜振华.2010年我国恶意代码新特点的研究.第26次全国计算机安全学术交流会论文集,2011,(09). [8]IDIKA N,MATHUR A P.A Survey of Malware Detection Techniques [R].Tehnical Report,Department of Computer Science,Purdue University,2007. 0引言 现有的压缩算法有很多种,但是都存在一定的局限性,比如:LZw [1]。主要是针对数据量较大的图像之类的进行压缩,不适合对简单报文的压缩。比如说,传输中有长度限制的数据,而实际传输的数据大于限制传输的数据长度,总体数据长度在100字节左右,此时使用一些流行算法反而达不到压缩的目的,甚至增大数据的长度。本文假设该批数据为纯数字数据,实现压缩并解压缩算法。 1数据压缩概念 数据压缩是指在不丢失信息的前提下,缩减数据量以减少存储空间,提高其传输、存储和处理效率的一种技术方法。或按照一定的算法对数据进行重新组织,减少数据的冗余和存储的空间。常用的压缩方式[2,3]有统计编码、预测编码、变换编码和混合编码等。统计编码包含哈夫曼编码、算术编码、游程编码、字典编码等。 2常见几种压缩算法的比较2.1霍夫曼编码压缩[4]:也是一种常用的压缩方法。其基本原理是频繁使用的数据用较短的代码代替,很少使用 的数据用较长的代码代替,每个数据的代码各不相同。这些代码都是二进制码,且码的长度是可变的。 2.2LZW 压缩方法[5,6]:LZW 压缩技术比其它大多数压缩技术都复杂,压缩效率也较高。其基本原理是把每一个第一次出现的字符串用一个数值来编码,在还原程序中再将这个数值还成原来的字符串,如用数值0x100代替字符串ccddeee"这样每当出现该字符串时,都用0x100代替,起到了压缩的作用。 3简单报文数据压缩算法及实现 3.1算法的基本思想数字0-9在内存中占用的位最 大为4bit , 而一个字节有8个bit ,显然一个字节至少可以保存两个数字,而一个字符型的数字在内存中是占用一个字节的,那么就可以实现2:1的压缩,压缩算法有几种,比如,一个自己的高四位保存一个数字,低四位保存另外一个数字,或者,一组数字字符可以转换为一个n 字节的数值。N 为C 语言某种数值类型的所占的字节长度,本文讨论后一种算法的实现。 3.2算法步骤 ①确定一种C 语言的数值类型。 —————————————————————— —作者简介:安建梅(1981-),女,山西忻州人,助理实验室,研究方 向为软件开发与软交换技术;季松华(1978-),男,江苏 南通人,高级软件工程师,研究方向为软件开发。 数据快速压缩算法的研究以及C 语言实现 The Study of Data Compression and Encryption Algorithm and Realization with C Language 安建梅①AN Jian-mei ;季松华②JI Song-hua (①重庆文理学院软件工程学院,永川402160;②中信网络科技股份有限公司,重庆400000)(①The Software Engineering Institute of Chongqing University of Arts and Sciences ,Chongqing 402160,China ; ②CITIC Application Service Provider Co.,Ltd.,Chongqing 400000,China ) 摘要:压缩算法有很多种,但是对需要压缩到一定长度的简单的报文进行处理时,现有的算法不仅达不到目的,并且变得复杂, 本文针对目前一些企业的需要,实现了对简单报文的压缩加密,此算法不仅可以快速对几十上百位的数据进行压缩,而且通过不断 的优化,解决了由于各种情况引发的解密错误,在解密的过程中不会出现任何差错。 Abstract:Although,there are many kinds of compression algorithm,the need for encryption and compression of a length of a simple message processing,the existing algorithm is not only counterproductive,but also complicated.To some enterprises need,this paper realizes the simple message of compression and encryption.This algorithm can not only fast for tens of hundreds of data compression,but also,solve the various conditions triggered by decryption errors through continuous optimization;therefore,the decryption process does not appear in any error. 关键词:压缩;解压缩;数字字符;简单报文Key words:compression ;decompression ;encryption ;message 中图分类号:TP39文献标识码:A 文章编号:1006-4311(2012)35-0192-02 ·192·

六级单词解析造句记忆MNO

M A: Has the case been closed yet? B: No, the magistrate still needs to decide the outcome. magistrate n.地方行政官,地方法官,治安官 A: I am unable to read the small print in the book. B: It seems you need to magnify it. magnify vt.1.放大,扩大;2.夸大,夸张 A: That was a terrible storm. B: Indeed, but it is too early to determine the magnitude of the damage. magnitude n.1.重要性,重大;2.巨大,广大 A: A young fair maiden like you shouldn’t be single. B: That is because I am a young fair independent maiden. maiden n.少女,年轻姑娘,未婚女子 a.首次的,初次的 A: You look majestic sitting on that high chair. B: Yes, I am pretending to be the king! majestic a.雄伟的,壮丽的,庄严的,高贵的 A: Please cook me dinner now. B: Yes, your majesty, I’m at your service. majesty n.1.[M-]陛下(对帝王,王后的尊称);2.雄伟,壮丽,庄严 A: Doctor, I traveled to Africa and I think I caught malaria. B: Did you take any medicine as a precaution? malaria n.疟疾 A: I hate you! B: Why are you so full of malice? malice n.恶意,怨恨 A: I’m afraid that the test results have come back and your lump is malignant. B: That means it’s serious, doesn’t it, doctor? malignant a.1.恶性的,致命的;2.恶意的,恶毒的 A: I’m going shopping in the mall this afternoon, want to join me? B: No, thanks, I have plans already. mall n.(由许多商店组成的)购物中心 A: That child looks very unhealthy. B: Yes, he does not have enough to eat. He is suffering from malnutrition.

压缩编码算法设计与实现实验报告

压缩编码算法设计与实现实验报告 一、实验目的:用C语言或C++编写一个实现Huffman编码的程序,理解对数据进行无损压缩的原理。 二、实验内容:设计一个有n个叶节点的huffman树,从终端读入n个叶节 点的权值。设计出huffman编码的压缩算法,完成对n个节点的编码,并写出程序予以实现。 三、实验步骤及原理: 1、原理:Huffman算法的描述 (1)初始化,根据符号权重的大小按由大到小顺序对符号进行排序。 (2)把权重最小的两个符号组成一个节点, (3)重复步骤2,得到节点P2,P3,P4……,形成一棵树。 (4)从根节点开始顺着树枝到每个叶子分别写出每个符号的代码 2、实验步骤: 根据算法原理,设计程序流程,完成代码设计。 首先,用户先输入一个数n,以实现n个叶节点的Huffman 树; 之后,输入n个权值w[1]~w[n],注意是unsigned int型数值; 然后,建立Huffman 树; 最后,完成Huffman编码。 四、实验代码:#include #include #include #define MAX 0xFFFFFFFF typedef struct / /*设计一个结构体,存放权值,左右孩子*// { unsigned int weight; unsigned int parent,lchild,rchild; }HTNode,*HuffmanTree; typedef char** HuffmanCode;

int min(HuffmanTree t,int i) { int j,flag; unsigned int k = MAX; for(j=1;j<=i;j++) if(t[j].parent==0&&t[j].weight s2) { tmp = s1; s1 = s2; s2 = tmp; } } void HuffmanCoding(HuffmanTree &HT,HuffmanCode &HC,int *w,int n,int &wpl) { int m,i,s1,s2,start,j; unsigned int c,f; HuffmanTree p; char *cd; if(n<=1) return; m=2*n-1; HT=(HuffmanTree)malloc((m+1)*sizeof(HTNode)); for(p=HT+1,i=1;i<=n;++i,++p,++w) { (*p).weight=*w; (*p).parent=0; (*p).lchild=0; (*p).rchild=0; }

相关文档
最新文档