text:
# The Most Important Forex Terms You Must Know!

Forex Trading stands for foreign exchange trading, which is the purchasing or selling of one type of currency in exchange for another. In this global over-the-counter market, investors use their Forex terms.

In this post, we explain the most important Forex terms. You will encounter these on the way to becoming a successful forex trader.

## Important Forex Terms and Trades

A position, in Forex terms, describes trade in progress. A long position, for instance, means that a forex trader purchased currency expecting its value to go up.

Once they sell it back to the market at a higher price, the trade is complete, and his/her long position closes.

On the other hand, a short position refers to a situation where a trader sells a particular currency to expect its value to decrease, to buy it back at a lower price. The short position will close once the trader buys back the currency, ideally at a lower price.

If the currency pair of EUR/USD, which refers to Euro/US Dollar, were trading at1.0914/1.0916, for example, investors planning to open a long position on the Euro would purchase one Euro for 1.0916 US dollars. They will then hold on to the currency, hoping its value will increase, and then sell it back to the market once it appreciates.

On the other hand, investors looking to open a short position on the Euro will sell one Euro for 1.0914 US dollars, expecting its value to depreciate. If their expectations come true, they will buy it back at a lower rate and make a profit.

### Forex Markets

With central banks, retail forex brokers, commercial corporations, commercial banks, hedge funds, individual investors, and investment management firms participating in the forex market, it is easy to see why this market is more significant than equity and futures markets combined.

Placing a trade in the forex market is quite simple. The basics of Forex Trading are very similar to the mechanics of other financial markets, such as the stock market.

Therefore, traders with prior experience in any financial market should quickly understand Forex Trading.

### Pips

The Forex term pip is used in Forex to describe the change in value between two currencies as they move either up or down.

Every currency has its value, and so to calculate the equivalent value of a pip, there is a set process to follow:0001 divided by the exchange rate = Pip value There are some exceptions in the valuing of pips, particularly in the case of currency pairs that include the Japanese Yen as these are often only quoted to two decimal places.

Brokers will calculate the pip value on your behalf, but it is helpful to understand the underlying process. Ultimately, this accumulation of pips will influence the calculation of trading profit or loss.

### Leverage

Leverage is the double-edged sword of Forex trading. While on the one hand, it provides retail traders with the chance to make substantial profits from the currency markets, by exploiting only relatively small movements in currency prices, it can equally lead to situations where losses, if unchecked, can far exceed original investments.

Knowing the implications of leverage, how it works, and how it can be used effectively will, over time, prove to be highly beneficial. This means learning to manage leverage to give the best possible chance of making profits while reducing the risks and possibilities of accumulating losses.

Leverage, by definition, is the instrument that allows a trader to borrow and control much more significant amounts of collateral, using only relatively small personal investment. Traders can enter transactions using this private investment, that when leveraged, is multiplied to give control of a much more significant stake of currency. This means that profits can be made from relatively small currency price movements.

The important lesson to remember is that leverage works in both directions; therefore, in the same way, that leverage will increase the value of any profits; it can also rapidly multiply any losses.

In practice, leverage will be used every time you execute a transaction order. When entering an order, you will be required to select the level of leverage you wish to apply to that transaction, determining the amount of currency you ultimately control. The margin is the amount of money you must put towards the transaction. This amount will have to be available within your account before a broker executes the trade on your behalf.

### Margin

As previously mentioned in connection with leverage, it is not necessary to have an account funded with \$100,000 to control a lot of currency with that equivalent value. Instead, following the application of leverage, a broker requires you to have a percentage or deposit on account, to which this leverage will be applied when you trade. This percentage or deposit is what is known as the Account Margin. The value of this deposit will depend on the type of account held, the specific requirements of your broker, and your individual preference.

Brokers will often require the account to be sufficiently funded above the account margin so that any surplus amount can be available to fund possible losses.

### Forex Terms: Bids, Offers, and Spreads

When dealing with the pricing of currency in the Spot Forex market, there will always be two prices at any one time for every currency pair. These two prices are known as the bid and offer price, and the difference between them is known as the spread. Understanding the difference between these two values is essential, as they are a vital element of all trading strategies.

Key Lesson: The bid price will be the price quoted at which you can sell currency, and the offer/ask is the price you will be quoted when you wish to purchase currency.

The bid price will always be lower than the offer/ask price, and it is this spread between the two prices that allows brokers and market makers to profit from transactions.

### Long and Short Positions

One of the most attractive features of the Forex market is the opportunity to make profits whether prices go up or down. As a trader, it is possible to accumulate pips irrespective of whether they come from upward or downward trends, significantly increasing the potential returns available and providing considerable flexibility for developing a trading strategy.

When a trade is made, the Forex term used to describe this is taking a position. If the trade is based on a transaction where the trader predicts that the price of a currency will increase over the duration, then this is known as a long position or going long. Conversely, when the trader makes a transaction that predicts that the price will decrease throughout the trade, this is known as a short position or going short.

### Order Types

To execute either the purchase or sale of currency, it is necessary to provide instructions on the quantity and method with which a trade should be conducted. The combination of these instructions is known as an order. There are four main types of order, and it is vital to be aware of the nature and implications of each.

#### Market Order

The market order, sometimes known as a free order, is an instruction to buy or sell at the best available current price. This means that a trade will be executed immediately at either the current ask price or bid price depending on whether the trade is for a purchase or a sale. Therefore, if the bid price for GBP/USD is 1.5673 and the asking price is 1.5675, then, with a market order, you would buy at 1.5675 and sell at 1.5673.

#### Limit-Entry Order

The limit-entry order is an instruction to buy at a certain level below the current market price or sell at a certain level above the current market price. Depending on the direction of the particular order, then limit orders can be further specified as either a buy limit order or a sell limit order.

This type of order can be used to ensure that you don’t miss the opportunity to make a trade. They are also handy for executing a specific trading strategy, as they ensure that entry and profit targets can be set and executed accordingly.

Limit orders generally cost more to use than market orders. However, the benefits to the trader often outweigh the extra cost.

#### Stop Order

The stop order is an instruction to buy or sell when the price reaches a predetermined level. This means that it can be used to set entry and exit targets to limit potential losses or lock-in profitable gains. The stop order is often referred to as either a stop or a stop loss. The specific methods for using this type of order will be discussed later.

Stop orders are not always guaranteed to get specific entry or exit points. When there are sudden swings in price, your broker may only be able to practically execute the stop order at levels lower or higher than initially expected.

It is essential to read and understand the specific guidelines for your broker's execution of stop orders, ultimately influencing how you utilize them in your trading strategy.

#### Other Order Types

In addition to the four main order types, several more unusual order categories are more suited to experienced traders. You never have to use these order types, but it can be helpful to be aware of them. They include Good-Until Cancelled (GTC), Good-for-the-Day (GTD), One-Cancels-the-Other (OCO), One-Triggers-the-Other (OTO).

Key Lesson: In practice, the stop order can help ensure that profits are collected before trend reversals or as an essential tool to limit the potential risk associated with each trade. Setting a stop loss below an entry point when going long on trade will help ensure that if the price reverses, losses are kept to the absolute minimum. The opposite should be applied in a short trading scenario.

The exact locations for the placement of stop orders will depend upon the trading strategy employed. However, it is worth being aware that if the stop order is set too close to an entry-level, then small oscillations in price may lead to a trade being closed prematurely. Therefore, it is sensible to place stop orders below or above significant support or resistance levels.

### Trailing Stop

The trailing stop is a Forex term that describes a specific stop order that moves about price fluctuations.

A trailing stop adjusts according to the direction of a particular trade, tracking the price of a currency. The result produces a stop level that is constantly changing about price movements so that the point at which a trade could close is adjusted. This helps to lock in profits and automatically reduce any losses if the price reverses.

Key Lesson: The trailing stop order is essential for Forex traders and should be integral in many trading strategies. Trading Strategy: If you decide to go long on the GBP/USD and buy for 1.5780, you could set a trailing stop at 20 pips (initially 1.5760). This will mean that, should the price move against you and drop through the 1.5760 value, your stop would be activated, and the trade closed. However, should the price increase, as you predicted, the trailing stop should track this value and increase correspondingly. Should the price continue to reach 1.5800, then the trailing stop would now be set at 20 pips below this new level, i.e., at 1.5780. The stop level will continue to rise proportionally to correspond with any price rises. Should the currency price fall, then the trailing stop does not drop back but remains at whatever level is reached before the reversal, in this case, 1.5780. The trade will remain open if the market does not move against you by more than 20 pips; the trade would be closed. The overall result is that most gains accumulated during the work are locked in.

### Placing an Order

The exact procedure to follow when placing an order will vary slightly between brokers and different trading platforms. However, irrespective of the precise method, whenever you place an order, you will need to consider several common factors that will form the basis of your trading strategy: – Select which currency pair you wish to trade.

• Decide whether you are going long or short on the trade.
• Check your analysis and ensure that you know where the price could be going.
• Check indicators and tools to reinforce the strategy.
• Predetermine exit points (using support and resistance).
• Predetermine a profit target (don’t get greedy!).
• Select an order type.
• Select the lot size.
• Manage the risk associated with the trade (this will be discussed in more detail in later sections).

This, or a similar checklist, should always be used before you make any transactions. Going through each stage methodically will help structure how you execute transactions and help prevent making mistakes. It serves as a check and balance system that will help analyze each trade from several perspectives before making any commitments.

Once an order has been executed, it is essential to monitor the trade and implement tools that will help analyze the overall performance. Effective Forex trading requires keeping a cool head to try and not act too impulsively.

Key Lesson: It is essential to stick to a strategy. There will often be situations where you may hit your profit target and feel that you have further potential to make money by staying in the trade. Chasing profits can be dangerous, and remaining in a trade longer than planned can increase the possibility of being hit by price reversals. These risks can be reduced by closely monitoring trades and setting stop losses at appropriate levels.

Similar situations can occur in loss-making trades where it can be tempting to stick with a trade hoping that it will ultimately reverse. Set a stop loss and stick with it. Losses are a fact of life for regular Forex traders but ensuring that they are kept to an absolute minimum will ensure that you win more times than you lose.

That was an overview of the most popular Forex terms. Of course there are many more! Which one do you remember? Write us a comment!

We will be happy to hear your thoughts
Register New Account


text:
# Data Analysis¶

In this section we describe the different online searches looking for GW signals, the selection and vetting of candidates, and parameter estimation analysis.

When multiple candidates from different pipelines are close enough together in time, they will be considered as originating from the same physical event and will be grouped into a single superevent. See the following pages for technical details.

The timeline for distribution of alerts is described below.

Here, we describe the sequence of LIGO/Virgo alerts for a single event that will be distributed through the Gamma-ray Coordinates Network (GCN) via notices and circulars (see the Alert Contents and Sample Code sections for details).

Within 1–10 minutes after GW trigger time, the first and second preliminary notices will be sent fully autonomously. The trigger will be immediately and publicly visible in the GraceDB database. Since the procedure is fully automatic, some preliminary alerts may be retracted after human inspection for data quality, instrumental conditions, and pipeline behavior.

Within 24 hours after the GW trigger time (possibly within 4 hours for BNS or NSBH sources), the Initial or Retraction notice and circular will be distributed. It will include an updated sky localization and source classification. At this stage, the event will have been vetted by human instrument scientists and analysts. The candidate will either be confirmed by an Initial notice and circular or withdrawn by a Retraction notice and circular if the data quality is unsuitable.

Within a day, black hole mergers will be fully vetted by experts and retraction or confirmation status will be reported.

Update notice and circulars are sent whenever the sky localization area or significance accuracy improves (e.g. as a result of improved calibration, glitch removal, or computationally deeper parameter estimation). Updates will be sent up until the position is determined more accurately by public announcement of an unambiguous counterpart. At that point, there will be no further sky localization updates until the publication of the event in a peer-reviewed journal.

At any time, we can promote an extraordinary candidate that does not pass our public alert thresholds if it is compellingly associated with a multimessenger signal (e.g. GRB, core-collapse SN). In this case, Initial notices and circulars will be distributed.

Automated preliminary alerts are sent for all events that pass a false alarm rate (FAR) threshold. The FAR threshold is $$3.8 \times 10^{-8}$$ Hz (one per 10 months) for CBC searches and is $$7.9 \times 10^{-9}$$ (one per 4 years) for unmodeled burst searches. Since there are 4 independent CBC searches and 3 independent burst searches, as well as a coincidence search RAVEN that looks at the results from both the aforementioned CBC and burst searches, the effective rate of false alarms for CBC sources is $$1.9 \times 10^{-7}$$ Hz (one per 2 months), and for unmodeled bursts is $$3.2 \times 10^{-8}$$ Hz (one per year).

format: plain


text:
An analysis of the structural context of microRNA seed sites within 3’UTR sequences points to certain microRNA families which show enriched seed sites within hairpin structures. A sub-set of these hairpins are enriched by AU rich PUM2 binding motifs.

PUM2 seems to be a specific microRNA/hairpin targeting RNA binding protein. The scoring of all 3’UTR sequences supports that PUM2 binding sites are over-represented within hairpins which include microRNA seeds. The gene ontology of genes incorporating microRNA seeds within hairpins yields up an interrelation to the PcG protein complex and the regulation of mesenchymal cell proliferation.

## Introduction

The classical dogma of Molecular Biology described a directed one-way relationship of gene regulation through Genes $$\rightarrow$$ Transcriptome $$\rightarrow$$ Proteome. Gene regulation turned out to be much more complex and diverse with the understanding of gene regulatory networks. Thus networks enable alternative paths as DNA interacts indirectly through its RNA or protein expression products with other DNA segments. The dogma therefore needed to be expanded.

Regulation of gene expression can act on several stages of the DNA-protein pathway: Regulation of Transcription, RNA Processing, RNA Transport and Translation. The majority of genes are protein coding and are controlled at first stage by regulation of transcription rates either through chromatin arrangement and histone modification or through the activity of transcription factors.

Transcription initiation in eukaryotes requires the interaction of transcription factors forming the transcription initiation complex [Kadonaga1998]. This initiation can be regulated by specificity factors such as the sigma factors [Moran1989] or repressors impending the RNA Polymerase progress. A group of activators increases the promoter binding attractiveness and enhancers initiates secondary structure changes in order to bring the promoter into reach of the initiation complex [Serfling1985].

At second stage, genes are controlled at RNA level by post-transcriptional regulation. This includes alternative splicing, degradation by the exosome complex, processing (capping, splicing, polyadenylation and RNA editing), nuclear export and translation. Post-transcriptional regulation gained more attention lately as it plays a larger role than previously assumed [Mata2005]. It has been shown that the amount of processed RNA within the nucleus and cytoplasm differ greatly which gave raise to the magnitude of post-transcriptional regulation [Schwanekampa2006]. The main regulatory processes probably are RNA binding proteins (RBP) and RNA interference (RNAi). RNAi is an RNA-dependent gene-silencing pathway and the two possible RNAs interacting are siRNAs and microRNAs and with increasing 1733 human mature microRNAs reported in miRBase 17, RNAi became a major regulatory pathway. The RNA-induced silencing complex (RISC) has a catalytic component called Argonaute protein which loads the siRNA or miRNA and cleaves the target mRNA. There is also a possible interaction with DNA called RNA-induced transcriptional silencing (RITS). The RNAi pathway exists in metazoa as well as in plants. The main difference lays within the microRNA biogenesis: in the case of plants the microRNA biogenesis is located entirely within the nucleus and is processed by a single enzyme called Dicer-like 1. The final duplex is then exported into the cytoplasm where the mature microRNA is incorporated into RISC.

microRNA biogenesis in metazoa in the context of cellular compartmentalisation. The biogenesis involves several steps which are catalysed by Drosha and Dicer. The product is a duplex where the mature miRNA gets incorporated into the RISC complex. The targeted mRNA gets either translationally repressed or degraded. (Attribution: Narayanese)

Messenger RNAs (mRNAs) are linking the genetic information of the DNA with the synthesis of proteins as an interstage product between transcription and translation. Within the information flow from DNA to proteins, the coding strand of DNA gets transcribed to mRNA. RNA is along with DNA and proteins one of the three major macro molecules essential to all forms of known life. As DNA, RNA is composed of nucleotides in which are four different types: adenine (A), cytosine (C), uracil (U) and guanine (G). Each nucleotide is bound in 3' direction through its phosphate group with the ribose of the next, forming a single stranded chain.

As a necessity of rapidly changing conditions all steps of gene expression are strictly controlled and targeted by many regulatory processes. In case of mRNAs, one post-transcriptional regulator are microRNAs. Micro (mi)RNAs are small RNA molecules typically of size of 22 nucleotides. They derive from primary miRNA gene transcripts called Pri-miRNA which get processed by Drosha into Pre-miRNA. The Pre-miRNAs are exported into the cytoplasm where they get processed by Dicer into miRNA:miRNA* duplexes. After unwinding the dsRNA duplex, the mature miRNA is available. Bound to Argonaute proteins forming the RISC assembly, miRNAs interact with the 3'-untranslated region (3'UTR) of mRNAs and regulate these through two main mechanisms: mRNA degradation and mRNA translation inhibition. The interaction is initiated through the 3'UTR binding site forming hybrids with the miRNA seed region (positions 2 to 8 in the miRNA) [Eulalio20089]. In a similar manner, RNA-binding proteins (RBPs) interact with 3'UTRs as regulators through a sequence specific binding and can both stimulate and inhibit gene expression [Kedde2008].

Even predicted miRNA targets highly correlate with gene expression suppression [Lim2005] not all expression changes are explained by predicted miRNA targeting. It has been shown that RBPs are also correlated with post-transcriptional regulation and are globally coupled to effective microRNA target sites [Jacobsen2010].

It is evident that RBPs play a crucial role within post-transcriptional regulation and mRNAs interact with hundreds of them [Anantharaman2002]. Also, correlation analysis showed that RBPs need to be considered in microRNA target prediction and interpretation [Jacobsen2010]. A question still open is on which level these RBPs and certain microRNAs interact and what the underlying mechanisms are. Main focus laid on site accessibility in microRNA target prediction which improved the prediction of binding sites [Long2007,Rabani2011]. A common used model is based on the free energy gained from formation of microRNA-target duplex and the energetic cost of unpairing the target for accessibility ( $$\Delta\Delta{}G$$ ) [Kertesz2007]. In Kedde2010 a novel mechanism of a RBP-induced structural switch mediating microRNA expression was introduced, combining the common understanding of target site accessibility and target site structure. Kedde et al. showed that miR-221/222 are not functioning at their full capacity towards CDKN1B 3'UTR as a result of target site obstacle. Using micro-injection of short RNAs containing both 3' and 5' fluorophores they were able to show that Pumilio-1 (PUM1) induces a local structural change of the target site in a FRET experiment. So far, it is the only example of an RBP modulated structural switch in mRNA. As concluded by Kedde et al., more examples are expected due to the generally high conservation of 3'UTR regions. The aim of this thesis will be to predict further potential candidates for an interaction of RBPs with the structural composition of microRNA target sites within 3'UTR sequences.

## Material 3'UTR Sequences and miRNA seed sites

For the further analysis, 3'UTR sequences from the TargetScan Human 5.2 database were used. In case a gene has multiple transcripts, the transcript with the longest 3'UTR was selected for the Targetscan database. The set consists of 17840 3'UTR sequences in total. The database of predicted miRNA target sites was also downloaded from the TargetScan Human 5.2 database. Though, only the set of conserved and broadly conserved miRNA families was considered. Whereby conserved families are conserved across most mammals up to placenta mammals and broadly conserved families include miRNAs conserved across most vertebrates including zebrafish [Friedman2009]. Additionally, only conserved miRNA target sites are incorporated into the database. Site conservation, as used by Targetscan, is defined by conserved branch length. This score is the sum of phylogenetic branch length of species containing target sites as described by Friedman et al. This score is corrected for the individual 3'UTR conservation. The downloaded set contains 54979 predicted microRNA target seed sites.

## Correlation between miR seed site accessibility and over-represented words

A first approach was to look for correlation between microRNA seed site accessibility and over-represented words. For each of the 54979 predicted microRNA seed sites the corresponding mRNA sequences were extracted containing flanking regions of plus/minus 70nt. This led to a set of 51323 sequences of length 147nt. The discrepancy is due to sites that are too close to the UTR ends to extract full-length flanking regions. As target sites are very dense the extracted sequences may overlap. Because the used method for discovering over-represented words is based on word occurrence in a sorted list, this overlap will bias the statistic of word representation due to artificial enrichment. To reduce the redundancy all extracted sequences are represented as a graph where nodes are connected by edges if the sequences start coordinates are closer than 100nt. The maximal independent set of this graph are vertices which do not have a common edge and are not a subset of any other independent set. The implementation was done using NetworkX 1.5 and led to a set of 15778 sequences.

Maximal independent set of microRNA target sites: Extracting the set of seed sites with flanking regions of 70nt leading to sequences of 147nt length. This sequences can overlap and introduce redundancy. A graph represents all the extracted sequences where edges are drawn if sequences are closer than 100nt. Graph theory is used to extract the maximal independent set which is [1,3,4] in this example.

The sequences were ranked by their global accessibility score. This score tries to reflect the microRNA target site accessibility which is important for binding specificity. The score is derived using the RNAfold 1.8.5 software package and is described in Leibovich2010. The global accessibility score ( $$GA$$ ) of sequence $$S_i$$ is calculated as $GA(S_i) = \Delta G_{open}(S_i) + \Delta G_{all}(S_i)$ where $$\Delta G_{all}$$ is the minimum free energy (mfe) of the 147nt long sequence $$S_i$$. $$\Delta G_{open}$$ describes the free energy loss by opening the structure and is defined as: $\Delta G_{open}(S_i) = \Delta G_{all}(S_i) - \Delta G_{masked}(S_i)$ To calculate this free energy loss it is necessary to force the target site into an opened structure by masking 25nt by "N" with the seed site centred. The free energy of this masked sequence is called $$\Delta G_{masked}(S_i)$$. The motivation to use ranked lists by the global accessibility is that functional seed sites in highly inaccessible regions probably require a cooperative activity of RNA binding factors. Their binding motifs will be imbalanced within the ranked lists due to their correlation with the accessibility score.

Forcing a RNA fold a) into an open structure b) by masking nucleotides by "N".

Distribution of $$GA(S_i)$$ of the maximal independent set of 15778 target sites.

Cwords is a software for regulatory motif discovery using correlation with rank lists by Jacobsen2010. It uses a Binomial model to calculate the probability $$P_w(X\leq x)$$ of word occurrence in a sequence where the specific word probability is derived from a Markov model on shuffled k'mers of the sequence to derive the background distribution. The over-representation scores (OR-scores) $$s_{w,i} = -\ln (P_{w,i}(X\leq x))$$ of word $$w$$ in sequence $$i$$ are sorted according to the ranking list. Finally, a running sum of the sorted OR-scores is used in connection with a variation of the Kolmogorov-Smirnov test to find correlated words. In case of a correlation between the ranking list and the OR-scores, the running sum function shows a directed variation from a random walk like curve. The background distributions of ranked sum curves are derived by permutation of the sequences. Cwords was run with standard parameters using word sizes of 6,\,7 and 8nt.

Cwords reports two motifs within the aligned top counting words which correlate with inaccessible sequences and two motifs correlating with accessible sequences.

Correlated words overrepresented in accessible sequences.

Correlated words overrepresented in inaccessible sequences.

They are GC rich words for inaccessible targets and AU rich words for more accessible sequences. Of interest in this matter is how well the global accessibility score $$GA(S_i)$$ correlates with the energy needed to open the target structure $$\Delta G_{open}$$. The Pearson correlation coefficient is 0.71 but the data shows a strong non-linearity. A linear regression shows that the residuals are not normally distributed (Shapiro-Wilk test: $$p\ll 0.01$$ ) and are not independent and show great auto-correlation. To evaluate the differences, the target sequences were ranked by the $$\Delta G_{open}$$ score and the analysis was re-run using cWords with standard parameters. The only difference is that the over-represented words correlate less strong with the $$\Delta G_{open}$$ score than with the global accessibility score $$GA$$. But the words actually showing correlation are again CG rich for sequences with energy-demanding sequences (results not shown).

## Focus on targets within hairpins

As reported by Kedde et al., the experimentally approved structural switch includes a hairpin structure. Therefore, it is assumed that hairpins play an important role within a potential structural switch and the next step was to move focus to miRNA targets within hairpin structures. The mfe structure was predicted of all 3'UTRs targeted by one of the 54979 predicted miRNA target sites. Regular expressions were used to search bracket representation for miRNA sites targeting hairpin structures within a sliding window of 37nt. A valid hairpin was defined as:

• the miRNA seed site is within the valid hairpin and has maximal one unpaired base
• the miRNA seed site can be followed by up to 5 paired bases
• the hairpin needs to have a loop of minimum 1 unpaired nucleotide
• the opposite sequence of the stem is allowed up to two unpaired bases

The analysis leads to a total of 2613 miRNA seeds within valid hairpins. Having done a Fisher test as for miRNA family miR-221/222 in the following table gave a list of most unbalanced microRNA families where 21 miRNA families have p-values smaller than 0.05. It needs to be mentioned that the p-values are not corrected for multiple testing. The microRNA showing the greatest enrichment within hairpins is miR-410.

Example of a secondary structure of a valid hairpin. The miRNA seed site (yellow) needs to be within the valid hairpin and is allowed one unpaired base. The seed site can be followed by up to 5 paired bases (blue) followed by the loop of minimal length of 1nt. The oposite sequence of the stem is allowed to have up to two unpaired bases.

 miR221/222 other miRNA hairpin 24 2613 - 24 = 2589 other 295 52366 - 295 = 52071

Fisher test of miRNA family 221/222 targeting hairpins gives a p-value of $$\approx$$ 0.025

## Interrelation of targeted hairpins and over-represented words.

The further analysis concentrated on the data-set of 2613 seed sites within valid hairpins. This set was further reduced to a maximal independent set of 2235 sequences. The following figure shows the distribution of $$\Delta G_{open}$$ of the subset of valid hairpins compared to the distribution of all seed sites. The Wilcoxon test shows that both distributions differ significantly ( $$p<2e-16$$ ).

The main fraction of hairpin structures scores in a range of -12 to -2. To find over-represented words within the hairpins which correlate with the energy score $$\Delta G_{open}$$ a sequence set was extracted of 30nt long sequences not including the microRNA target site following the direction of the hairpin. The 300 most correlated words reported by cWords were aligned and visualised using Weblogo [Crooks2004]. Within the top 10 motifs is also one AT rich motif with an average z-score of $$\tilde{z}=3.01$$ standing out of the otherwise GC rich motifs.

Distribution of $$\Delta G_{open}$$ of all target sites compared to the subset of valid hairpins (red).

Motifs are based on aligned over-represented words as reported by cWords. Shown are only results of words which show positive correlation with the energy score $$\Delta G_{open}$$. Analysis and clustering was done using cWords on a maximal independent set of 2235 sequences forming valid hairpin structures.

### microRNA related motifs within hairpins

Next, I focused on subsets of hairpins by microRNA family showing great imbalance according to the top of table S1. The identification of over-represented motifs was done using self-organising maps and the software SOMBRERO v.1.1 [Mahony2005a,Mahony2005]. Further see Self Organising Maps.

The self organising map consists of a grid of MxN nodes where each node has the coordinates $$s=(s_1,s_2)$$ and is described by a certain position weight matrix (PWM) of a motif of length $$l$$. The PWM represents a feature of the input sequences where $$p(b,i)$$ is the probability of having nucleotide $$b$$ at position $$i$$ compared to the background probability $$p(b)$$. $PWM(b,i) = \log_2\frac{p(b,i)}{p(b)}$

After the training, all the PWMs span over the entire feature space of the input sequences due to unsupervised learning. The PWMs of the SOM grid are first initialised using random values. SOMBRERO uses a more structured approach for initialisation but the random approach does not affect the motif-finding accuracy and the main idea of the SOM [Mahony2005]. During the training the input sequences are segmented into overlapping sub-sequences of length $$l$$. Batches of these sequences are associated in a incremental fashion to the closest node on the grid by maximum likelihood, i.e. the highest scoring PWM. A motif can be easily scored by summing the position specific values of the weight matrix. A position count matrix (PCM) keeps track of the composition of associated sequences and is used to update the PWM of the node after each round of training. Additionally, neighbourhood nodes are also updated using a distance specific weight $$\Phi |s-s'|$$ (in case of SOMBRERO the Gaussian neighbourhood function is used: $\Phi(|s-s'|) = \exp(-[(s_1-s'_1)^2+(s_2-s'_2)^2]/\gamma)$

The influence of neighbour nodes is defined by the parameter $$\gamma$$ which decreases during the cycles and reduces the influence throughout the training. After repeating the training cycle until a convergence is met, the grid spans over the feature space of all input-sequences and each sequence is associated with its closest node. To find over-represented motifs a random set of input sequences is used to derive the expected number $$E(n_i)$$ of sequences associating with a certain node $$i$$ of the SOM. Using multiple random sets also gives the standard deviation $$\sigma_i$$ at each node. These random sets derive from a Markov chain based model.

Finally, a z-score is used to rank the motifs. $z = \frac{n_i - E(n_i)}{\sigma_i}$ As a background, a 3th order Markov chain was trained on a set of sequences obtained by extracting $$\pm$$ 250nt around each target site of a certain miRNA family. SOMBRERO was used to find over-represented motifs searching for words of length 6 and 8. Results of interest are shown in the supplementary material in figure S2.

### Interrelation of Pumilio and hairpins

Pumilio became a subject in recent research related to microRNA function [Triboulet2010,Kedde2010,Leibovich2010]. The aim of the further analysis is to characterise a possible interrelation of PUM2 binding sites and their cooperative behaviour in relation to hairpin structures. The PUM2 binding profile was obtained from Hafner2010 and converted into a PWM. All 3'UTR sequences were scored using the PUM2 PWM and matches with a score greater than 10 were reported which led to a total of 11,888 potential PUM2 binding sites. To classify the amount of PUM2 binding sites, all 3'UTR sequences were taken which have a potential binding site for PUM2. This led to a sequence of length 12,428,774 where a 5th order Markov chain was trained on as a background model.

The Poison distribution was used to test the Null-hypothesis that the occurrence of PUM2 binding sites is just by chance due to the composition of the sequences (no correction for multiple testing). The results show PUM2 sites which are imbalanced within hairpin structures in general.

PUM2 sites were linked with microRNA targets within hairpins and PUM2 sites within annotated hairpins plus/minus 30nt were reported. The following table shows the 9 microRNA families which have an imbalanced amount of PUM2 binding sites within microRNA targeted hairpins based on the Fisher-test (uncorrected p-values). Finally, the Fisher-test was used to answer the Null-hypothesis that the distribution of PUM2 motifs within hairpins is independent of the annotation by microRNA target sites. The following table shows the distribution of PUM2 motifs and the Fisher test gives a p-value of 9.05E-3 which means that there are significant more PUM2 motifs within hairpin structures if they are annotated microRNA targets.

### Gene Ontology

The Gene Ontology database [Consortium2000] is an effort to define a standardised vocabulary to annotate genes and gene products. A great fraction of genes and gene products are equal or similar between all eukaryotes sharing the same core functions. This knowledge about the biological function of shared gene products can therefore be transferred in most cases. The GO database has three domains: biological processes, molecular functions and cellular components. The Ontology is organised as a directed acyclic graph which means that vertices are connected through directed edges without forming directed cycles. The Gorilla web service was used [Eden2009] to determine whether microRNA targets within hairpins show any enrichment compared to microRNA targets outside of hairpins. An enrichment of a specific GO term is calculated by: $enrichment = \frac{b/n}{B/N}$ where $$b,B$$ are the amount of genes associated with a specific GO term and $$n,N$$ are the total number of genes associated with any GO term. Capitalised letters represent the total amount of genes in target and background set and small letters stand for target set related measures.

The probability of the enrichment derives from a Fisher's test. The hypogeometric distribution is a version of the binomial distribution without replacement where the hypogeometric tail describes the probability of having $$b$$ or more successes (specific GO annotations) in a sequence of $$n$$ draws out of a population of size $$N$$ with $$B$$ of this specific GO term: $P(X\geq b) = \sum_{i=b}^{\min (n,B)} \frac{\binom{n}{i}\binom{N-n}{B-i}}{\binom{N}{B}}$ As a remark, this p-value is not corrected for the multiple testing of GO-terms. GO-terms with a p-value smaller than 1E-3 were reported. Further, the REViGO web service [Supek2010] was used to cluster GO terms based on similarity measures [Schlicker2007]. All reported GO terms were used with their p-values and a distance threshold of 0.7. The first target set are 1784 gene IDs with microRNA seeds within valid hairpin structures where 1667 are annotated with a GO term. The background set consists of 7383 gene IDs with microRNA seeds in other kind of structures where 6894 are annotated with a GO term.

MicroRNA seeds within hairpin structures show an enrichment of genes related to biological processes taking part in

• Notch signaling pathway
• pattern specification processes
• developmental processes
• biological regulation
• chromatin modification

They show an enrichment in their molecular functions of

• sequence specific DNA binding RNA polymerase~II transcription factor activity
• nucleic acid binding
• zinc ion binding
• nucleic acid binding transcription factor activity

and are related to cellular components such as the

• PcG protein complex

The second target set was the sub-set of 273 gene IDs of microRNA seeds within hairpin structures having a predicted PUM2 binding site in the neighbourhood of 30nt of the hairpin were 251 are GO annotated. The background set consists of 8894 gene IDs of microRNA seeds not being part of the target set were 8561 are GO annotated. The PUM2 related hairpin targets show enrichment for the biological process of

• regulation of mesenchymal cell proliferation

They are enriched in their molecular functions of

• nucleic acid binding
• zinc ion binding
• molecular function
• retinoic acid 4-hydroxylase activity

And are related to the cellular component:

• PcG protein complex

## Discussion

The aim of this thesis was at first to build a model of a RBP introduced structural switch mediating microRNA accessibility of 3'UTR sequences. It turned out that there was only one reported example [Kedde2010] and it became obvious that the focus of the analysis had to change to a more general sequence analysis. The publication of the structural switch proposes three interesting domains: microRNA regulation, structural composition of target sites and interaction of RBPs. The new aim became to characterise the interplay of this three subjects.

The first interesting article showing up during the literature research was by Leibovich et al. which introduces the global accessibility score as a structural approach and describes a cooperative activity of PUM1 and miR-410.

The intuitive idea was that highly conserved but inaccessible microRNA targets should show some cooperative behaviour with RBPs to overcome the barrier of their inaccessible targets. The global accessibility score $$GA$$ was meant to be a suitable measure for this approach, incorporating both: the overall composition of the sequence and the necessary free-energy difference to open the seed site.

CWords was used to find over-represented words which correlate with the ranking of the sequences by their global accessibility score. The method is based on an imbalance of words within a ranked list where the test statistic is based on a empirical background distribution. This makes it easily adoptable to ranking lists based on any kind of scoring.

As there were almost no information about the expected results this analysis was looking for, it was necessary to define some criteria not to drown within the flood of words and motifs. The decision was to focus on AU rich motifs which would stand out of the GC rich background of the highly inaccessible target sequences. This decision also agrees with the Pumilio binding site reported in the two articles the thesis started with Kedde2010,Leibovich2010.

Unfortunately, Cwords only shows a correlation of GC rich sequences with highly dense and inaccessible structures and that open structures are AU rich. This result was expected due to the 3 hydrogen bonds of GC base pairs. An AU rich motif as reported in Jacobsen2010 did not show any significant correlation with inaccessible sequences.

The further analysis showed that the relationship between global accessibility score $$(GA)$$ and $$\Delta G_{open}$$ is non-linear. The interpretation of this results is that the signal of the 3 hydrogen bonds of GC rich words is too strong and overrules the probably weaker AU rich signal correlating with the $$\Delta G_{open}$$ part. The global accessibility score is given by: $GA(S_i) = 2\Delta G_{all}(S_i) - \Delta G_{masked}(S_i)$ which shows the dominant character of the general sequence composition. The sequence composition is of course somehow related to structural properties of a sequence and therefore to their accessibility. But the concern is that the $$GA$$ score is too dependent on the GC content of the sequence.

To test this hypothesis the sequences were ranked according to their $$\Delta G_{open}$$ value. The only difference in the results was that the GC rich words have lower z-scores and show weaker correlation than before. The conclusion is that the structural features - which are probably not restricted to distinct sequence motifs - are overcome by the GC prone energy scores.

As the approach did not give anything of interest the three domains need to be narrowed down and the further analysis focused on hairpin structures. This decision was motivated by the one experimental approved example of a structural switch including a hairpin structure. If the hairpin structure is actually a necessary feature of the structural switch, it explains why the correlation of the global accessibility score $$GA$$ was unsuccessful. Focusing on over-represented words showing greatest energy barrier for opening the target sites do not include hairpin structures.

The definition of a valid hairpin is strongly orientated at the hairpin reported by Kedde et al. It turns out to be very strict but as there is no further data to base any evaluation of hairpin criteria on, any decision seems as good as the other.

The analysis leads to 2613 microRNA seed sites within hairpin structures. The mfe structure predicted by RNAfold does not necessarily represent the folding in vivo. As a limitation of the thermodynamic models, the prediction accuracy decreases with the sequences length. The prediction was made on full 3'UTR sequences which varied highly in length within a range of several 10k. This obviously means that not all of the predicted hairpins actually fold in vivo and that there are probably some missing.

After the data-set was narrowed down to seed sites within hairpins, cWords reports one AU rich motif of 9 over-represented words which show correlation with the $$\Delta G_{open}$$ score.

The Results show that 21 microRNA families present strong imbalance of target sites within hairpin structures. There is certainly a risk of false positives as the Fisher tests were not corrected for multiple testing. It needs to be discussed whether the significance criteria of p-value $$> 0.05$$ is sufficient. In a next step the data-set was further split into subsets by microRNA family. The motivation was that regulatory motifs are maybe microRNA specific.

The method of choice was SOMBRERO which is based on a SOM. The SOM seams to be eligible because of several reasons: On the one hand, the SOM is a semantic mapping which is used to reduce the dimensionality of words to motifs. This is motivated by the fact that RBPs have less specific seed sites which makes simple word analysis undesirable. On the other hand, the SOM is an unsupervised learning method which makes it very flexible regarding sequence requirements. The map adopts to the complexity and distribution of sequence features with more nodes of the map pointing towards parts of the input space of higher complexity. Also, there is only one parameter to adopt SOMBRERO to the characteristics of the specific input sequences which is the amount of nodes in the map. Finally, the trained map can be used to calculate a significance of the learned sequence motifs.

The results show over-represented motifs selected for PUM2 which SOMBRERO reports within the top 3 scoring motifs. The results show strong evidence for a Pumilio like motif. Also, cWords reports parts of a Pumilio binding site at position 6-9 of the AU rich motif. The analysis gave enough evidence to limit the RBP to Pumilio and to examine the role of Pumilio in relation to microRNA seed sites within hairpins.

The scoring of all 3'UTR sequences shows that the highest scoring PUM2 binding motif is under-represented compared to the background probability which gives evidence to evolutionary pressure on PUM2 motifs because of their role in 3'UTR targeting.

Compared to the amount of PUM2 motifs found, it shows that 2 motifs are especially enriched and 1 under-represented within hairpin regions. Interestingly, it is the highest scoring motif UGUAUAUA again which is also particularly under-represented in hairpins.

Furthermore, the microRNA families which show significant imbalance of PUM2 binding sites within hairpins. The top PUM2 enriched hairpins are annotated by microRNA families which also show over-represented targets within hairpins in general, namely: miR-410, miR-300 and miR-340. The target site of miR-300 (CUUGUAUA) shows the beginning of a PUM2 binding site. The seed sites of the microRNA were masked but it could be that miR-300 target sites occur regularly in pairs. This means that the miR-300 seed site increases chances of getting a PUM2 binding site as it provides already 6 out of 8 nucleotides. This would influence their background probability and probably mean that PUM2 binding sites are not as over-represented as assumed. It needs to be verified whether PUM2 sites within miR-300 targeted hairpins are also miR-300 targets themselves. However, it does not change the fact that PUM2 binding sites are imbalanced towards hairpin structures as reported by the Fisher test.

A final Fisher test shows that significantly (p=9.05E-3) more PUM2 binding sites are within hairpins if they are also annotated by microRNA seed sites.

Contrary, there are two microRNA families showing preference for hairpins but are underrepresented with PUM2 targets, namely: miR-141/200a and miR-124/506. This two microRNA families are good candidates for other RBPs showing cooperative behaviour with microRNA targets within hairpins.

The results of the gene ontology analysis show that all enriched GO terms in all three domains of the sub-set of PUM2 targeted hairpins with microRNA seeds are also a sub-set of the enriched GO terms of all microRNA targeted hairpins. Especially, hairpins with PUM2 binding sites show an enrichment in genes related to the regulation of mesenchymal cell proliferation and are related to the PcG protein complex. The PcG protein complex is a chromatin-associated multiprotein complex which is know to maintain long-term gene repression in Drosophila to preserve body patterning through development by influencing chromatin structure [Francis2004]. Mesenchymal cells are multipotent stem cells which can differentiate into fat cells, bone cells and cartilage cells.

It is presumed that there are other RBPs associated with microRNAs within hairpins. The GO terms suggest that the genes not targeted by PUM2 are related to the Notch signaling pathway and encode transcription factors.

## Summary

There are certain miR families which show enriched seed sides within hairpin structures. The genes forming this hairpins show a relation to the PcG protein complex which is important for long-term gene repression during development of Drosophila. Additionally, some of the hairpins with microRNA seed sides show binding sites of PUM2. PUM2 seems to have a specific cooperative behaviour towards hairpin structures with microRNA seed sides. Particularly, miR-410, miR-300, and miR340 are potentially main co-partners of PUM2. The genes regulated by this microRNA targeted PUM2 hairpins are involved in the regulation of mesenchymal cell proliferation through the PcG protein complex.

Whether the cooperative behaviour of PUM2 with this microRNA seeds within hairpins incorporates a structural switch cannot be assessed by this analysis. But it is a likely assumption as it is experimental shown for one example where this analysis was based on. Additionally, cWords reports a potential PUM2 binding motif which is particularly enriched within hairpins showing greatest inaccessibility based on the $$\Delta G_{open}$$ energy score.

## Supplementary material

S1: Distribution of miRNA targets within hairpins with p-value<0.1 . The p-value derives from a Fisher test and reflects the imbalance between targets within and outside of hairpins. The p-value is not correct for multiple testing. The column all sites shows the total count of target sites, hairpins show the fraction of sites within valid hairpins and p-value the p-value of the Fisher test.

miRNA family all sites hairpins p-value
miR-410 475 59 2.28E-11
miR-410 475 59 2.28E-11
miR-300 715 70 1.46E-08
miR-374/374ab 499 42 4.19E-04
miR-592/599 146 0 1.41E-03
miR-494 375 32 1.41E-03
miR-340/340-5p 1094 75 1.94E-03
miR-140/140-5p/876-3p 253 3 4.24E-03
let-7/98 907 26 5.70E-03
miR-124/506 1479 49 7.58E-03
miR-1/206 639 17 1.11E-02
miR-290-5p/292-5p/371-5p 208 18 1.34E-02
miR-133 530 14 1.80E-02
miR-141/200a 580 40 1.83E-02
miR-96/1271 866 27 1.95E-02
miR-137 949 30 2.05E-02
miR-128 865 27 2.36E-02
miR-221/222 319 24 2.46E-02
miR-370 246 19 3.47E-02
miR-182 927 31 4.26E-02
miR-194 269 20 4.39E-02
miR-34a/34b-5p/34c/34c-5p/449/449abc/699 515 15 4.76E-02
miR-217 251 19 5.07E-02
miR-504 148 2 5.07E-02
miR-758 149 2 5.10E-02
miR-145 589 18 5.11E-02
miR-144 724 46 5.22E-02
miR-181 1039 63 5.50E-02
miR-139-5p 259 19 5.63E-02
miR-382 130 11 5.92E-02
miR-216/216a 163 13 6.27E-02
miR-149 277 20 6.38E-02
miR-543 536 35 6.51E-02
miR-30a/30a-5p/30b/30b-5p/30cde/384-5p 1241 73 6.79E-02
miR-590/590-3p 907 32 8.32E-02
miR-136 153 12 8.33E-02
miR-135 546 17 8.44E-02
miR-18ab 197 4 8.99E-02
miR-431 99 1 9.38E-02
miR-22 343 23 9.64E-02

S3: Potential PUM2 binding motifs and their occurrence within 3'UTR sequences. The background probability $$p(bg)$$ derives from a 5th order Markov model trained on a background sequence of all 3'UTR with potential PUM2 binding sites (length: 12,428,773). The reported p-value derives from the Poison test.

 score 10.24 13.26 11.91 11.05 11.05 10.03 13.05 11.7 10.17 word UGUAAAAA UGUAAAUA UGUAAAUU UGUACAUA UGUAGAUA UGUAUAAA UGUAUAUA UGUAUAUU UAUAAAUA occurrence 1483 2157 1317 1205 520 1287 1904 1649 1688 $$p(bg)$$ 3.08E-4 1.06E-4 9.32E-5 4.95E-5 2.32E-5 8.49E-5 1.15E-4 9.84E-5 8.66E-5 p-value 2E-16 2E-16 4.85E-6 2E-16 2E-16 4E-12 2E-16 2E-16 2E-16


text:
# ∫ 1 Sin X ( 3 + 2 Cos X ) D X - Mathematics

Sum
$\int\frac{1}{\sin x \left( 3 + 2 \cos x \right)} dx$

#### Solution

We have,
$I = \int\frac{dx}{\sin x \left( 3 + 2 \cos x \right)}$
$= \int\frac{\sin x dx}{\sin^2 x \left( 3 + 2 \cos x \right)}$
$= \int\frac{\sin x dx}{\left( 1 - \cos^2 x \right) \left( 3 + 2 \cos x \right)}$
$= \int\frac{\sin x dx}{\left( 1 - \cos x \right) \left( 1 + \cos x \right) \left( 3 + 2 \cos x \right)}$
$\text{Putting }\cos x = t$
$\Rightarrow - \sin x dx = dt$
$\Rightarrow \sin x dx = - dt$
$\therefore I = \int\frac{- dt}{\left( 1 - t \right) \left( 1 + t \right) \left( 3 + 2t \right)}$
$= \int\frac{dt}{\left( t - 1 \right) \left( t + 1 \right) \left( 3 + 2t \right)}$
$\text{Let }\frac{1}{\left( t - 1 \right) \left( t + 1 \right) \left( 3 + 2t \right)} = \frac{A}{t - 1} + \frac{B}{t + 1} + \frac{C}{3 + 2t}$
$\Rightarrow \frac{1}{\left( t - 1 \right) \left( t + 1 \right) \left( 3 + 2t \right)} = \frac{A \left( t + 1 \right) \left( 3 + 2t \right) + B \left( t - 1 \right) \left( 3 + 2t \right) + C \left( t + 1 \right) \left( t - 1 \right)}{\left( t - 1 \right) \left( t + 1 \right) \left( 3 + 2t \right)}$
$\Rightarrow 1 = A \left( t + 1 \right) \left( 3 + 2t \right) + B \left( t - 1 \right) \left( 3 + 2t \right) + C \left( t + 1 \right) \left( t - 1 \right)$
$\text{Putting t + 1 = 0}$
$\Rightarrow t = - 1$
$1 = A \times 0 + B \left( - 2 \right) \left( 3 - 2 \right) + C \times 0$
$\Rightarrow 1 = B \left( - 2 \right)$
$\Rightarrow B = - \frac{1}{2}$
$\text{Putting t - 1 = 0}$
$\Rightarrow t = 1$
$1 = A \left( 2 \right) \left( 5 \right) + B \times 0 + C \times 0$
$\Rightarrow A = \frac{1}{10}$
$\text{Putting 3 + 2t = 0}$
$\Rightarrow t = - \frac{3}{2}$
$1 = A \times 0 + B \times 0 + C \left( - \frac{3}{2} + 1 \right) \left( - \frac{3}{2} - 1 \right)$
$\Rightarrow 1 = C \left( - \frac{1}{2} \right) \left( - \frac{5}{2} \right)$
$C = \frac{4}{5}$
Then,
$I = \frac{1}{10}\int\frac{dt}{t - 1} - \frac{1}{2}\int\frac{dt}{t + 1} + \frac{4}{5}\int\frac{dt}{3 + 2t}$
$= \frac{1}{10} \log \left| t - 1 \right| - \frac{1}{2} \log \left| t + 1 \right| + \frac{4}{5} \times \frac{\log \left| 3 + 2t \right|}{2} + C$
$= \frac{1}{10} \log \left| t - 1 \right| - \frac{1}{2} \log \left| t + 1 \right| + \frac{2}{5}\log \left| 3 + 2t \right| + C$
$= \frac{1}{10} \log \left| \cos x - 1 \right| - \frac{1}{2} \log \left| \cos x + 1 \right| + \frac{2}{5} \log \left| 3 + 2 \cos x \right| + C$

Concept: Indefinite Integral Problems
Is there an error in this question or solution?

#### APPEARS IN

RD Sharma Class 12 Maths
Chapter 19 Indefinite Integrals
Q 60 | Page 178


text:
# Why is the beam bending stiffness taken as $EI/L$?

In moment distribution method, the bending stiffness of a beam is taken as $$EI/L$$. But in these kinds of stiffness tables, the flexural rigidity is usually divided by some power of $$L$$:

So why is $$EI$$ divided by simply $$L$$ to get the bending stiffness, instead of some of its powers as in the tables? Could somebody provide a quick derivation? Thank you!

• Translation deformation: The stiffness is the invert of the member flexibility ($$f$$), which is an index of member deflection ($$\Delta$$), so $$K = \frac{1}{f} = \frac{1}{\Delta}$$. For member subjects to uniform load, $$\Delta = \frac {5wL^4}{384EI}$$, $$K = \frac {384EI}{5wL^4}$$; for member subjects to mid-span concentrate load, $$\Delta = \frac{PL^3}{48EI}$$, $$K = \frac{48EI}{PL^3}$$, and so on for other load cases. $$K$$ is sometimes referred to as the member "deflection/deformation stiffness".
• Rotational deformation: The stiffness is the invert of the flexibility of the member end rotation when subjects to the applied moment. The flexibility is the index of rotation $$f = \theta = \int \frac {M}{EI} dx$$, and $$K = \frac{M}{\theta} = \frac{EI}{L}$$. This is the stiffness used in the moment distribution method, and in the structural stiffness matrix of the finite element program. It is sometimes referred to as the "bending stiffness".
One special case, for member subjects to uniaxial loads (tension/compression) only, such as the truss member, $$K = \frac{EA}{L}$$.


text:
24 views

### What's the use of TagSet [duplicate]

I see this function definition in the file(galois.m), but I don't know how it works. ...
100k views

### What are the most common pitfalls awaiting new users?

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...
133 views

### What is the point of tagset /:? [duplicate]

I'm teaching myself Mathematica and came across tagset. So I followed the example in the link, but seem to be missing the point. All of the below give me the same answer after assignment: that ...
76 views

### How does Wolfram Language implement for enabling symbols to receive various forms of parameters? [duplicate]

How does the official implement a list/tuple of parameters that can be different in type and quantity as a whole? After re-read @Szabolcs's and @MichaelE2's comments. Finally, I accepted the ...
58 views

### Understanding TagSetDelayed

I was reading What is the distinction between DownValues, UpValues, SubValues, and OwnValues? and I started to be confused with the part "Upvalues" of the first answer. Some of my confusion comes ...
63 views

### What is exactly an element a[i] in mathematica? [duplicate]

I'm confused about the logic behind mathematica programming. We can have function that will be called doing $f[x]$, thus the element $f[x]$ can be seen as the return value of a function taking an ...
163 views

### Scope of dummy variables used in defining a function

I define a function and then define another function, using the same name for the dummy variables as I used for the first function. Will Mathematica use the first definition in the second definition? ...
211 views

### What makes a pattern more general?

This is a rewording of the question. The original post is below. How come that a pattern for an expression with a specific head is not more specific than a pattern for an expression with a generic ...
178 views

### Get imaginary part of symbolic expression [duplicate]

I define ψ1 = Sqrt[Subscript[ρ, 1][t]] E^(I Subscript[θ, 1][t]); ψ2 = Sqrt[Subscript[ρ, 2][t]] E^(I Subscript[θ, 2][t]); and ...
46 views

### Multiple Square Bracketed Function definition

I am familiar with the typical way of defining a function--such as f[x_,y_]:=x+y but I have not found a discussion of definitions such as ...
1k views

753 views

### Compute the half width and full width at half maximum (HWHM / FWHM) of a mathematical expression

I have managed to compute the half width at half maximum (HWHM) and full width at half maximum (FWHM) of a sinc function through the code below. ...
63 views

### How to recall set variables in simple Product[] and Sum[] functions?

I'm new to Mathematica but have been trying to write a code that will define new variables based off of variables preset by a user. I'm allowing them to define a variable ...
147 views

### table parametric plot ode

I have a series of ODEs I'd like to plot (a double pendulum specifically) Where I'm comparing my own "handwritten" ODE to that of System modelers solutions. This is mostly an exercise to ensure the ...
814 views

### Finding Anagrams of given length from DictionaryLookup

What I'm trying to find are the 4 letter words in the Mathematica dictionary that have the most anagrams and the amount of anagrams these have each. But I can't seem to find all the 4 letter words in ...
319 views

### Why is the first argument of the SetDelayed evaluated?

In[1]: f=g; In[2]: SetDelayed[f[x_],x^2]; In[3]: ?f Globalf f=g In[4]: ?g Globalg g[x_]:=x^2 However, SetDelayed has the ...
205 views

### WL terminology: evaluate, call, invoke, use, etc

A WL (Mma) program is a sequence of expressions to be evaluated, which generally involves applying commands and functions to actual arguments. What is the accepted terminology for what I think of as ...
367 views

### Plot 3D doesn't show anything

Good Evening, I defined a function which is composed of other several functions. Mathematica compiles well but I can't get a plot and I do not understand way. Can anyone help me with the code and ...
258 views

### Define scalar quantity that squares to 1?

My equations contain different cases which differ only by some signs. So in order to work with all cases simultaneously, I introduce a placeholder for a sign: s[x] ...
124 views

### Why doesn't CloudDeploy work in my desktop

I have difficulty in making CloudDeploy in my desktop. Does anyone know why ? Thanks Here is what I see: Here is the code if someone would like to test ...
155 views

### How to map a function over a dimension in a matrix? [closed]

I have a function g[x,r] yielding a 3x1 vector, where x is a ...
117 views

### Custom opaque operator with custom axioms?

Is there any way to define a custom opaque operator/function in Mathematica that satisfies custom axioms, so that the Mathematica engine can perform simplifications using those axioms? For example, ...


text:
## Chapter 4 - Integration

### Important concepts

• An antiderivative of F is the function you could take the derivative of to get F

• Integration by substitution may be the only way to integrate a function, and is very useful


text:
# Practical (and secure) PRGs

Does anyone know if there exists a PRG construction which takes as input an (RSA-sized) integer seed and outputs a fixed number of bits? There are number-theoretic PRGs such as the RSA, Micali-Schnorr, and BBB algorithms (see http://cacr.uwaterloo.ca/hac/about/chap5.pdf), but these require one to know both the seed and other parameters used in the construction (e.g., the modulus $n$). I need a construction that only requires the random integer seed as input. I'm aware that I could potentially fix a universal set of public parameters and then just specify the integer seed, but I'd like to avoid that since the parameters would likely need to be refreshed after a certain number of invocations or uses.

-
Why do you want to use a number-theoretic PRNG in the first place? There are many nice stream ciphers which are faster and stronger. –  CodesInChaos Feb 5 at 10:35


text:
Home / Section index www.icosaedro.it

PHPLint - FAQ

Page updated: 2018-05-29

Contents

Where the PHPLint directory should be saved on my HD?

Once uncompressed, save the PHPLint package anywhere you want. I recommend to name that directory simply "phplint" so paths referring to it never change as the package gets updated later. If you plan to use PHPLint and its library along with your web server, save the PHPLint directory above the document root of the web server, as no PHPLint file needs public visibility. For example, once installed the WAMP Server under Windows under the C:\wamp directory, put the phplint directory just inside it.

How can I start the php and the phpl scripts from any terminal?

Under Linux: edit the file $HOME/.bash_profile and add this last line: export PATH=$PATH:/path/to/phplint
where /path/to/phplint is the path to the PHPLint directory; logout and login again to make this change effective.

Under Windows: edit the value of the user's environment variable named Path by adding this string to its very end:
;C:\path\to\phplint
where C:\path\to\phplint is the path to the PHPLint directory; the change will be effective for any new open terminal from now on.

How can I know which version of PHPLint I'm using right now?

Start the phpl program from the command line with the --version option. The GUI program phplint.tcl also displays the current version of PHPLint used after each parsing of a source. Under each PHPLint directory there is also a file named VERSION.txt you may inspect.

How can I know if a new release of PHPLint is available? How can I update?

Periodically check the download page and check the displayed version available. For example, 3.1_20180416 means: major version 3, minor version 1, release date 2018-04-16. It is safe to save your current PHPLint directory with some name, for example "phplint_OLD", then replace that directory with the new one. Typically you will need to copy these files from the old directory

phpl[.bat]
stdlib/php.ini
stdlib/errors.php

as these files should have been already customized by you during the installation process; and do not forget to copy also your custom files you may have added to the stdlib tree.
You may also consider to use CVS to keep in synch with the development version of PHPLint; the download page explains how to do that.

Issues validating my source code

Why hundredths of errors signaled in my otherwise perfectly working program?

It's normal, but “working” does not implies it's also safe, secure, fully documented and easy to understand and to maintain. As an experiment, try to consider each complain of PHPLint one by one, fix it, and once you program passes validation compare the resulting source code with the original one, then take your conclusions. The article Worth the effort shows an experience of porting an existing source code to PHPLint and contains useful suggestions.

Can I turn off some boring error PHPLint signals?

No. A program either passes validation or does not. There are only two exceptions to this rule: checking for control characters in literal strings, and checking for non-ASCII characters in literal strings; these exceptions to the rule above are still here because I still don't know how exactly handle these cases, but in general it's better to leave these checks on, especially while parsing library files .

Typical message:

        $f = fopen("mydata.txt", "rb"); \_ HERE ==== 3: ERROR: unresolved function fopen You must indicate which modules (that is, PHP extensions) your program depends on, as explained in the reference manual, chapter Importing modules. In this case you will need the core and the file modules: /*. require_module 'core'; require_module 'file'; .*/ Or, you may want to require the standard module which in turn requires most of the common functions typically available under PHP. Cannot include anything, PHPLint complains the path is relative! Typical message:  require_once "MyLib.php"; \_ HERE (Linux) ==== 4: ERROR: invalid file "MyLib.php": cannot resolve relative path: "MyLib.php" Hint: expected absolute path (PHPLint safety restriction). The magic constant __DIR__ gives the directory of the current source. (Windows) ==== 4: ERROR: invalid file "MyLib.php": missing drive or remote host in path: "MyLib.php" Hint: expected absolute path (PHPLint safety restriction). The magic constant __DIR__ gives the directory of the current source. PHP applies a quite articulated and hardly predictable heuristic to find included files with relative path, so as a safety measure PHPLint requires all paths be absolute. You may build an absolute path starting from the directory of the current file by using the __DIR__ constant, for example: require_once __DIR__ . "/MyLib.php"; PHPLint does not recognize my functions defined in the same file! PHPLint is a single-pass parser, so it needs to see the definition of a function first, then its invocation. This implies all the functions must be defined in bottom-up order: if function b() invokes function a() then you must define a() first and b() next. This also implies the "main" function, or the program body, must be located at the very end of the source, for example: <?php function a() { ... } function b() { a(); } function main() { a(); b(); } main(); The same holds for any other item: constants, variables, classes and class members. The general rule then is: definitions first, usage next. PHPLint does not recognize my functions defined in another file! Every PHP file must explicitly include any other file it depends on, and these files must be included using the require_once statement. Class autoloading is very handy and efficient: consider to use it instead, see Class autoloading. The other inclusion statements include, include_once and require are allowed, but these files are not parsed recursively by PHPLint; only files included with require_once are; these statements can be used to include chunks of HTML code, for example, or other PHP code that does not defines functions or classes or other items. I can't do anything with$_GET and $_POST values because are "mixed"! Those superglobal variables may contain several types of data not predictable by the program, so a value-typecast operator must be applied to get the expected type of value, for example: $n = (int) $_GET['n'];$name = (string) $_GET['name']; See the Tutorial for more. The standard library also contains utilities to acquire and sanitize untrusted data coming from the browser, see the Input class. For more specific types and data structures, consider using the magic cast() function. Cannot not use arrays: it keeps telling I'm mixing elements of different types! Under PHPLint arrays are intended to collect elements all of the same type; avoid arrays to store heterogeneous collections of data, use classed for that purpose. If you really need to build an array of mixed types, first declare an empty array of type mixed[] then add the elements one by one: $a = /*. (mixed[]) .*/ array();
$a[0] = 1234;$a[1] = "some string";

But again, avoid doing that because accessing those element will require a type-cast each time.

It complains “unhandled error E_WARNING” for EVERY single I/O function!

PHPLint does its best to ensure the programmer and the program he writes are fully aware of which errors could be generated and from where these errors could come from, so errors must be either handled locally or declared to be triggered by functions. Please read the Errors handling chapter of the reference manual for more. The standard library normally maps errors into ErrorException because exceptions are safer and simpler to handle.

Still stuck. What else can I do?

Try with this troubleshooting check-list:

• Double-check the error message; if the message is related to some file path, carefully check that path and check if it matches your expectation; evaluate each error and warning message from the very beginning of the report and in the order, one by one.
• Look at the Tutorial as it contains several practical use-case examples.
• Look at the Reference Manual for issues related to the language syntax, DocBlock syntax, PHPLint meta-code syntax, built-in functions usage, types and type-cast operators, importing of packages and modules, class auto-loading.
• Look for a similar usage example in the standard library under the stdlib/ directory.
• For problems related to the usage of some specific package of the standard library or some specific module, look for a similar usage example in the standard library and in the test code under the test/ directory.
• Create the smaller chunk of source code that reproduces the issue and try working on it alone; the PHPLint on-line tool comes handy for this purpose.

 Umberto Salsi Comments Contact Site map Home / Section index


text:
# Question about embeddings in algebraically closed fields

I was looking at the two following well known propositions:

$1$) Let $E|F$ be a finite separable extension of degree n, and let $\sigma$ be an embedding of $F$ in $C$, where $C$ is an algebraic closure of $E$. Then $\sigma$ extends to exactly $n$ embeddings of $E$ in $C$;

$2$) The extension $E|F$ is normal if and only if every $F$-monomorphism of $E$ into an algebraic closure $C$ is actually an $F$-automorphism of $E$.

Observing the proofs, it seems to me that actually instead of $C$ we can pick any algebraically closed field $L$ containing $F$ (we don't need to assume that it contains also $E$ in these propositions, right?) $\textbf{in both propositions}$.

Is it correct? (I'm not so sure for prop 2)). What I'm thinking of, is the typical situation in number theory where you have $\mathbb C$ instead of $C$. In general $\mathbb C$ is not the algebraic closure of $E$, but just an algebraically closed field. So why in many texts the authors put algebraic closure instead of simply algebraically closed field?

• You're right that picking any algebraically closed field containing $E$ will work. Note that any such field also contains $F$ because $F$ is an algebraic extension of $E$. One reason for using $\mathbb C$ and $\mathbb R$ is because they are complete topological fields. These embeddings can be viewed as the "infinite primes" of a number field. A reason for sticking to the algebraic closure is because a lot of the theory extends to arbitrary Dedekind domains, in particular to rings like $\mathbb F_p[t]$. – Mathmo123 Dec 16 '16 at 9:09
• Actually the result you've quoted is just a result about fields. So a reason for not using $\mathbb C$ is because your field may not be contained in $\mathbb C$. – Mathmo123 Dec 16 '16 at 9:14
• sorry in my notation $F\subseteq E$, so actually you meant "picking any algebraically closed field containing $F$ will work" right? Anyway I do not understand why such an $L$ contains $E$ too. Does any algebraically closed field containing $F$ contains also any algebraic extension of $F$? – Richard Dec 16 '16 at 19:47
• Moreover, I do not understand your second comment. Do you refer to the first or second result? – Richard Dec 16 '16 at 19:55
• For the first, let $L$ algebraically closed containing $F$ and $K$ an algebraic extension of $F$. Now if $a\in K\setminus F$, then there is some non constant polynomial $f\in F[X]\subseteq L[X]$ such that $f(a)=0$. Since $L$ is algebraically closed, $f$ splits in $L[X]$, which means $a\in L$ so $K\subseteq L$. Is this correct? However, still I do not understand the second comment.Thank you – Richard Dec 16 '16 at 20:10

Because algebraic closures are intrinsic in terms of the field, and any algebraically closed field usually means that there's some topological structure. Eg. with $\Bbb C$ vs $\overline{\Bbb Q}$ the latter is purely algebraic in terms of the polynomials over $\Bbb Q$, but if you want to prove a result about embeddings like this one you prefer into $\overline{F}$ rather than $L\supseteq\overline{F}$. Because often there are many choices for such an $L$, and you don't want to write a separate proof for all cases. I would not want to prove this result two different times one for eg. $\Bbb C$ and another for $\overline{\Bbb Q_2}$. And if I'm dealing with a field of positive characteristic, obviously something like $\Bbb C$ is not even available to me.
• Thank you, but I can't appreciate the difference, since we can prove that given any field $F$, there exists an algebraically closed containing $F$ and at the same time we can prove that an algebraic closure of $F$ exists. So maybe I do not know many practical examples to appreciate the difference. The most relevant I know, is about number fields and in this case I have always found $\mathbb C$, namely an algebraically closed field, not an algebraic closure. – Richard Dec 16 '16 at 20:22


text:
# How to find an orthogonal basis for $W=\{\begin{bmatrix}a&b \\c&d\end{bmatrix}|a+b+c=0,a=d\}$ defined under $M_{2\times 2}(\Bbb{C})$

So we assume $M_{2\times 2}(\Bbb{C})$ has inner product $\langle A,B\rangle=$trace${(A^T\bar{B})}$

How to find an orthogonal basis for $W=\{\begin{bmatrix}a&b \\c&d\end{bmatrix}|a+b+c=0,a=d\}$ defined under $M_{2\times 2}(\Bbb{C})$

In my opinion, the subspace is spanned by the vectors that satisfy $a=-b-c,\ b=b,\ c=c,\ d=-b-c$. So they will be $(-1,1,0,-1),(-1,0,1,-1)$. To find orthogonal basis we apply Gram–Schmidt process. But the problem is the order. Let's say $v_2=u_2-\frac{\langle v_1,u_2\rangle}{\langle v_1,v_1\rangle}v_1$. In complex inner product space, $\langle v_1,u_2\rangle\ne\langle u_2,v_1\rangle$. Which order should we put?

In addition, if we want to find any orthogonal projection (i.e. $P_w(\begin{bmatrix}1&0\\0&0\end{bmatrix})$) onto $W$, we just find the orthonormal basis of $W$ and then apply $P_w(x)=\sum^k_{i=1} \langle x,w_i\rangle w_i$.

Am I missing anything?

• I think you are on track here in terms of how one would approach this problem. But make sure you understand why that recipe for projection works; for example, before asking for the "orthogonal" projection, you must indicate your inner product (which you rightly employ in the definition of $P_W$). Apr 10, 2016 at 13:14

If a+ b+ c= 0, then c= -a- b. If, further, d= a, then any such matrix can be written $\begin{bmatrix}a & b \\ -a- b & a\end{bmatrix}= \begin{bmatrix}a & 0 \\- a & a\end{bmatrix}+ \begin{bmatrix}0 & b \\ -b & 0\end{bmatrix}= a\begin{bmatrix}1 & 0 \\ -1 & 1\end{bmatrix}+ b\begin{bmatrix}0 & 1 \\ -1 & 0\end{bmatrix}$


text:
# Calculate percentage between two numbers

I have two numbers which summed up are considered to be $100\%$.

The first number $n_1$ should decide the percentage amount.

For e.g.,

$$n_1 = 5$$

$$n_2 = 15$$

so the percentage in this case would be $25\%$.

How do I calculate this? :) I mean how do I get the formula?

-

In this case, we want $\dfrac{n_1}{n_1 + n_2}$. I don't really have much else to say about it. If you want it in %, multiply by 100. Otherwise, it's a decimal between 0 and 1.


text:
# Metafor

ULiege - Aerospace & Mechanical Engineering

### Site Tools

doc:user:tutorials:tuto0

# Python in a nutshell

This section shows how to use Python, the interpretor used by Metafor, in a basic way. Ideally, Python official website should be used.

Python is a powerful scripting language allowing the creation of input files in a very convenient way for the developer, but it might look a bit tedious for a new user.

## Introduction

When Metafor is started, a window appears:

This window displays the command-line interpreter. This is a Python interpreter integrated within Metafor, allowing the user to type commands, in a similar way as in MATLAB.

Above the interpreter, a list of all the restrictions associated with the executable is shown (time limit, maximal number of nodes, …). The figure above corresponds to a full version associated to a specific computer.

Once Python is initialized, Metafor automatically loads the module toolbox.utilities, which contains a set of useful commands. To be more accurate, only the most useful functions of this module are loaded, to avoid using too much space in the root namespace.

A Metafor input file is a series of Python commands. An obvious disadvantage of a python script is that it is less user-friendly than graphical interfaces of Samcef or Abaqus CAE. However, in this context all Python tools (functions, objects, loops, conditional structures, …) can be used to easily create and parametrize a problem, leading to a very efficient way of developing numerical models.

Another interesting aspect of Python is its ability to interface compiled C++ code without the help of the programmer (the modules wrap are automatically created from the C++ source code). Therefore, Python is ideal for both the developer and the (well-informed) user.

Python is quite simple. For example, it can be used as a calculator in interactive mode:

>>> a=2
>>> b=3
>>> c=a+b
>>> c
5
>>>

In a script, the correct syntax to get the value of c requires the command print©.

The definition of variables allows the parametrization of Metafor input files. Therefore, as with every other piece of software, it is important to first define a set of variables and then work with these algebraic variables.

To display memory contents, use dir()

>>>> dir()
['__builtins__', '__doc__', '__name__', 'a', 'b', 'c', 'getDomain', 'getPath',
'loadFac', 'makeAnimation', 'meta', 'quit', 'restart', 'vizu']
>>>

The three variables that were just created can be seen, and so can the toolbox.utilities functions that were automatically imported (meta, vizu, …). Finally, __builtins__ is a module containing basic Python functions. To see them, the function dir() is used again.

>>> dir(__builtins__)
['ArithmeticError', 'AssertionError', 'AttributeError', 'DeprecationWarning',
'EOFError', 'Ellipsis', 'EnvironmentError', 'Exception', 'False',
'FloatingPointError',    'FutureWarning', 'IOError', 'ImportError',
'IndentationError', 'IndexError ...

## Types

The type of a variable is obtained with the command type(var). Every variable has a type (also called a “class”), however in Python the type of a variable can change during the execution of the code, unlike in Fortran or C.

>>> a=4
>>> type(a)
<class 'int'>
>>> a='text'
>>> type(a)
<class 'str'>
>>>

Metafor uses the basic python types (float, string, integer, tuple, …), but also its own types, which are defined by custom classes.

Finally, variables can be converted from one type to another. For example, int(2.3) is 2, when str(2.3) gives the string “2.3”.

## Functions

Simple functions can be created using the interpreter. This is quite useful to avoid any cut and paste, or simply to write algorithms as scripts. For example:

>>> def square(x): return x*x
...
>>> square(6)
36
>>>

Functions are essential in the proper writing of an input file. This way, complex operations may be defined and called several times, from the same module or even from other ones. For example, if the numerical model contains several similar contact matrices, it is worth parametrizing the creation of a matrix (definition of its points, lines, …), and then calling it several times with different arguments. Materials may also be assigned using functions.

Default values for the parameters of python functions may be set:

def myfun(x, a=1, b=1, c=0):
return a*x*x+b*x+c

where a, b and c are optional parameters. For instance, this function may be called with the command :

y = myfun(3, b=2)

Here, x=3, a=1, b=2 and c=0.

This function may be written in another way, using the lambda functions :

myfun = lambda x, a=1, b=1, c=0 : a*x*x+b*x+c

## Modules

It is quite useful to gather several functions into a file, to form a module (one module is defined with one file). In Metafor, every test case is defined in a module. For example, the test case named cont2 is located in Metafor/apps/qs/cont2.py and identified by apps.qs.cont2 under Python.

By default, Python already contains many modules. For example, the module called math defines all basic mathematical functions. To use a module, the statement import must be used (for example, import math). Then, to use a function of the math module, the point is used. For example, math.cos is the command used to compute a cosine:

>> import math
>>> dir(math)
['__doc__', '__loader__', '__name__', '__package__', '__spec__', 'acos', 'acosh',
'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh',
'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor',
...
'sqrt', 'tan', 'tanh', 'tau', 'trunc']
>>> math.cos(0.1)
0.99500416527802582
>>>

The online help is accessed with the command help():

>>> help(math.cos)
Help on built-in function cos in module math:

cos(...)
cos(x)

Return the cosine of x (measured in radians).

help(math) enumerates all functions found in the math module. The online help is quite useful and also available for all Metafor modules.

It is also possible to import all functions found in math in the current namespace with the command:

>>> from math import *
>>> cos(0.1)
0.99500416527802582
>>>

With this syntax, the math prefix is no longer necessary. However, conflicts could occur with other modules if they also contain a function named cos.

To use mathematical functions, the module math must be imported. In the same way, the functions which are used to build an input file in Metafor must be imported from the module wrap, using the command from wrap import *.

## Objects

Python is object-oriented. This means that classes can be created. To make it short, a class is a structure containing data, to which methods can be associated. For example, to compute the length of a vector, a function can be defined :

def vectLength(x, y, z):
import math
return math.sqrt(x*x + y*y + z*z)
At this point, it should be noted that a block of several instructions is defined with the indentation, in opposition to C which uses braces. Ending a block is done by decreasing the indentation. It may sounds complicated at first, however this way Python users are forced to indent their code, making it more readable.

The function called vectLength computes the length of the vector (x,y,z). However, this is not object-oriented, because the encapsulation principle is violated (the user is directly manipulating the components). In order to have an object-oriented code, a class (so a new type) representing this vector is created:

class vector:
def __init__(self,x,y,z):
self.x = x
self.y = y
self.z = z
def view(self):
print('x=', self.x, ' y=', self.y, ' z=', self.z)
def length(self):
import math
return math.sqrt(self.x*self.x + self.y*self.y + self.z*self.z)

Three methods (or member functions) have been defined: __init__, the constructor (see below) ; view(), displaying the vector using the function print ; and length, returning the length. Each method is defined within the class (see the indentation).

To compute the length of a vector, this vector is first created using the command

>>> v = vector(1, 1, 1)

This command calls the constructor (method __init__) of the class named vector. It should be noted that this function is defined with four parameters, the first one being self (equivalent to the pointer this in C++), but called with only three parameters (the self pointer is passed implicitly).

>>> type(v)
<class '__main__.vector'>
>>> v.view()
x= 1  y= 1  z= 1
>>> v.length()
1.7320508075688772
>>>

When creating an input file in Metafor, the user manipulates classes defined in the modules found in the folder wrap. Therefore, the user should understand basic object-oriented programming, even if an input file may be written without defining new objects.

## Loop - tuples - lists

In a Metafor input file, the same operation may be used several times in a row (for example, meshing the curves numbered from 1 to 10). In such a case, loops are used. A loop is written as:

for i in (1, 6, 8, 12):
print('i=', i)

where the values in parentheses constitute a “tuple”. In this example, “i” will successfully take the values 1, 6, 8 and 12, leading to four executions of the command print.

Instead of tuples, lists may also be used. To do so, brackets are used instead of parentheses. Unlike tuples, lists may be modified.

To create a list, the function range(i, j, k) is quite often used. This function works as i:k:j in Matlab.

>>> list(range(1, 10, 2))
[1, 3, 5, 7, 9]

A list may also be defined as :

[ x for x in range(100) if x%3==0 ]

leading to all numbers from 0 to 99 which can be divided by 3.

## Conditional statements

It may be useful to parametrize an input file in a complex way using conditional statements. For example, a boolean useLinearMaterial can be defined, to choose whether the material behaves in an linear way. This parameter, defined in the beginning of the input file, is easy to modify and leads to a conditional definition of a linear material. Such a construct requires the command if, which is used as :

if x>100:
print ("x>100")
elif x>10:
print ("x>10")
else:
print ("x<=10")

## Important notes

• The True and False booleans are noted with capital letter.
• A number starting with 0 corresponds to a number defined using the octal numeral system. For example, 012 corresponds to 10 in decimal.
• The command input('message') is used to ask the user to enter a value. This is useful to pause the input file, for example to view an intermediate mesh.
• The function print(a, b, c) prints the objects a, b et c on the same line, which can be quite useful for Metafor objects.
• The null command is named pass.
• Several commands may be written on the same line if separated by a semicolon, as in C.
• Strings are defined with simple ('), double (“) or triple quotation marks (”“”).

## Conclusions

In this page, the basic use of Python in a Metafor context was shown. However, it is useful to read others sources in order to understand the language better. More complex objects and commands exist (dictionaries, I/O commands, …) and can be used to improve the efficiency and clarity of an input file.

After reading this introduction to Python, this language can be used to define a first input file in Metafor:


text:
# Probability of Sampling Error Assistance

#### heidir1224

##### New Member
Hello! I am working on a mini project and am stuck on the third question! I think it's how the question is phrased that is throwing me off..?

I have posted the first two questions as well to see if that is somehow impacting my answer?

1. Compute the sample mean x and the sample standard deviation sx of Albertson’s grocery prices.
a. x=3.862
b. Sx = 1.1599
2. State the population mean µx and population standard deviation σx of sample mean x in terms of population mean µx and population standard deviation σx for the original variable x. (Hint: You don’t need to compute anything here. Think back to chapter 6)
a. µx = 3.862
b. σx = 1.1599
3. Find the probability that sampling error made in estimating the mean Albertson’s grocery prices is $0.50 or less. (For this problem, assume that the standard deviation σx is known to be$ 1.10).
a.
P(Sampling Error <.50)
Z=(x-µ )÷ ( σ÷√(n)
Z = (4.362 – 3.862) ÷ (1.1599 ÷ √25)
Z = .50 ÷ .23198
Z = 2.155358

I looked up 2.15 on the z-table and got .4842 which is 48.42%. Is this at all in the ball park? I feel like it's completely wrong and not what he's looking for.

Any and all help would be greatly appreciated! :tup:

Data:
3.29
4.99
3.49
3.49
3.89
3.69
3.99
1.99
2.99
4.99
3.29
2.79
4.39
3.29
3.59
6.99
2.99
3.69
3.29
3.19
4.99
2.99
6.69
4.59
2.99


text:
## Sunday, March 21, 2010 ... //

### Iyad Allawi apparently won in Iraq

Count me as an Iyad Allawi fan.

It seems that he has won the Iraqi elections - by a few thousand votes - and the central committee has rejected al-Maliki's requests for a recount.

I am convinced that if I were an Iraqi, I would be his voter. He is a guy with some international experience - yet he is clearly a patriot who seems proud about his funny accent in English, too. ;-)

A Shiite who is popular among the Sunnis because he wants to create a secular, non-sectarian Iraq, Allawi can boast some extraordinary courage from his bloody encounters with his ex-ally Saddam Hussain. Neurobiologist Allawi surely brings something from a modern hi-tech world to Iraq that I can identify with - a pleasant change in the exotic Arab world that tends to scare me (at least away from the tourist centers near beaches).

The media are no longer hysterically trying to paint the situation in Iraq as a disaster - because such mostly fabricated news no longer hurt George Bush. So once again, we're free to say that Iraq is getting much better. Just to remind you, the GDP per capita in 2003 was something like $500. It's$3,700 or so these days.

Allawi has always realized the genuine potential that a country like his own has under a sensible leadership. That's why he has thanked America for the liberation from Hussain and other services. After all, the Pentagon money spent in Iraq were a kind of investment into his homeland - an investment that will start to return once the newly acquired freedom is (almost) fully appreciated.


text:
# Finding local Maxima and minima then create a table

Use the First Derivative Test to find the points of local maxima and minima of the function $ƒ(x)=4x^3+3x^2−6x+1$.

The final answer is expected to be in the form of a table containing all the required information about f(x). Once the table is created, add the property row “Increase/decrease of f(x)”, add intervals, where f(x) is increasing/decreasing, and specify local maxima and minima.

• what have you done? – Dr. Sonnhard Graubner Oct 29 '14 at 20:18
• $f'(x) = 12x^2 + 6x - 6$ – Csci319 Oct 29 '14 at 20:19

we have $f'(x)=6(2x^2+x-1)=6(2x^2+x-1)=0$ solving this equation we obatien $(x+1)(x-1/2)=0$ solving $(x+1)(2x-1)\geq 0$ we get $-\infty<x\le -1$ or $\frac{1}{2}\le x<\infty$ in the other case $-1<x<\frac{1}{2}$ is $f(x)$ strictly monotonously decreasing
• so critical points are $x = -1 and x = 1/2$ then you use those to plug in for the maxima and minima? – Csci319 Oct 29 '14 at 20:26
• to get maxima and minima $f(-1) = 4(-1)^3 +3(-1)^2 + 6 (-1) - 6 = -13$ $f(1/2) = 4(1/2)^3 +3(1/2)^2 + 6 (1/2) - 6 = -7/4$ so is the min -13 at x=-1 and max -7/4 at x= 1/2? – Csci319 Oct 29 '14 at 20:35


text:
### Design Strategies for ARX with Provable Bounds: SPARX and LAX (Full Version)

Daniel Dinu, Léo Perrin, Aleksei Udovenko, Vesselin Velichkov, Johann Großschädl, and Alex Biryukov

##### Abstract

We present, for the first time, a general strategy for designing ARX symmetric-key primitives with provable resistance against single-trail differential and linear cryptanalysis. The latter has been a long standing open problem in the area of ARX design. The wide trail design strategy (WTS), that is at the basis of many S-box based ciphers, including the AES, is not suitable for ARX designs due to the lack of S-boxes in the latter. In this paper we address the mentioned limitation by proposing the long trail design strategy (LTS) -- a dual of the WTS that is applicable (but not limited) to ARX constructions. In contrast to the WTS, that prescribes the use of small and efficient S-boxes at the expense of heavy linear layers with strong mixing properties, the LTS advocates the use of large (ARX-based) S-Boxes together with sparse linear layers. With the help of the so-called Long Trail argument, a designer can bound the maximum differential and linear probabilities for any number of rounds of a cipher built according to the LTS. To illustrate the effectiveness of the new strategy, we propose SPARX -- a family of ARX-based block ciphers designed according to the LTS. SPARX has 32-bit ARX-based S-boxes and has provable bounds against differential and linear cryptanalysis. In addition, SPARX is very efficient on a number of embedded platforms. Its optimized software implementation ranks in the top 6 of the most software-efficient ciphers along with SIMON, SPECK, Chaskey, LEA and RECTANGLE. As a second contribution we propose another strategy for designing ARX ciphers with provable properties, that is completely independent of the LTS. It is motivated by a challenge proposed earlier by Wall{é}n and uses the differential properties of modular addition to minimize the maximum differential probability across multiple rounds of a cipher. A new primitive, called LAX, is designed following those principles. LAX partly solves the Wall{é}n challenge.

Available format(s)
Category
Secret-key cryptography
Publication info
A major revision of an IACR publication in ASIACRYPT 2016
DOI
10.1007/978-3-662-53887-6_18
Keywords
ARXblock ciphersdifferential cryptanalysislinear cryptanalysislightweightwide trail strategy
Contact author(s)
leo perrin @ inria fr
History
2021-05-31: revised
See all versions
Short URL
https://ia.cr/2016/984

CC BY

BibTeX

@misc{cryptoeprint:2016/984,
author = {Daniel Dinu and Léo Perrin and Aleksei Udovenko and Vesselin Velichkov and Johann Großschädl and Alex Biryukov},
title = {Design Strategies for ARX with Provable Bounds: SPARX and LAX (Full Version)},
howpublished = {Cryptology ePrint Archive, Paper 2016/984},
year = {2016},
doi = {10.1007/978-3-662-53887-6_18},
note = {\url{https://eprint.iacr.org/2016/984}},
url = {https://eprint.iacr.org/2016/984}
}

Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.