text:
• entries
3
10
• views
2314

1137 views

*See the EDIT below*

The impetus for this research topic is the necessity for threads to exchange data in an efficient manner, namely between the network and main threads. Within the context of networking, we want data to be quickly available to, and dispensable from, the main thread, and that means calling the corresponding system calls (e.g. sendto/recvfrom) as often as possible. In addition to this, there is necessarily some translation done between native and network formats, as well lookups and other operations that could be off-loaded to the network thread if possible.

However, this introduces a problem; as data arrives and is picked up by the network thread, or as logic in the main thread requires data be sent out to the network, how do the separate threads share this data? If we create a mutex for it, we introduce an expensive system call that causes delays and is generally unacceptable in a tight loop. Whatever solution we implement should not involve systems calls or any significant pause in execution.

If our shared data is simple enough to be just one variable - just one *instance* of something, if you will - then nothing fancy is needed. As an example, if the network thread needs to notify the main thread that a player has sent a QUIT message, and that this player be removed from all operations and deleted, a "player * quitting" member can be added, which is updated as necessary. The main thread will watch this member, and take appropriate action when it sees that it is non-null. So, the course of action for both threads is:

1. QUIT message received by player
2. update member "quitting" to refer to this player

1. check member "quitting"
2. if non-null, delete all associated resourced and updating member "quitting" to null

And this introduces yet another problem, as you can probably guess: what should the Network thread do with second QUIT message that it has received before the Main thread has finished processing the first one? It can simply queue this second message, and any others it receives, in a buffer. Each loop iteration, it will check to see if the member "quitting" is null, and if so, assign it to one of the items in the buffer (also removing this item from the buffer).

This solution works and is great in that it allows each thread to produce or consume data without waiting for the other. If data arrives in the producer, and the consumer is busy with previously shared data, it is simply queued, and the producer continues execution. The only cost incurred is one conditional in each thread, plus a buffer in the producer thread for queueing purposes.

The drawback of this approach is that only one item can be shared at a time. While this may be ok for QUIT messages - it would be uncommon for many players to quit in the few milliseconds it takes per each loop iteration - it would not be efficient for messages that are transferred more often. For this approach, two buffers can be used that swap their contents. Instead of explaining all the details, I will simply post the code I've written to support this://// Thread synchronization w/out semaphores//// the data producer can always insert data, and should call Commit() once during it's event loop// (the Commit() call will only commit produced data if the consumer has processed existing data)//// the data consumer will process data if there is any has been committed by the producer//template class Queue{private: std::vector m_clsIn; std::vector m_clsOut; bool m_blnData; bool m_blnProcessed;public: Queue() : m_blnData(false), m_blnProcessed(true) {} void Add(T clsData) { //ASSERT(thread == producer) m_clsIn.push_back(clsData); } void Commit() { //ASSERT(thread == producer) if ( m_blnProcessed && m_clsIn.size() > 0 ) { m_clsIn.swap(m_clsOut); m_blnProcessed = false; m_blnData = true; } } template void Process(Functor & refFunctor) { //ASSERT(thread == consumer) if ( m_blnData ) { for (size_t i=0; i); m_clsOut.clear(); m_blnData = false; m_blnProcessed = true; } }};
As incoming messages are received by the Network thread, it will call the Add() method. The Network thread will also call Commit() each loop iteration. The Main thread will call Process() each loop iteration to retrieve the message data. For outgoing messages, there will be a separate Queue object in which the above is reversed - the Main thread will call Add() and Commit(), and the Network thread will call Process().

Note: I've not tested this class yet. Specialized methods may be added to support certain data types or operations.

EDIT: Per [color=rgb(51,51,51)][font=helvetica]

### Josh's comment and the article he has linked, I've made some changes. Instead of swapping two vectors, one linked list is used with two pointers that refer to active and inactive portions of the list. Nodes that contain produced and un-consumed data constitute the active portion, while nodes containing consumed but un-produced data constitute the inactive portion.

[/font][/color]

[color=rgb(51,51,51)][font=helvetica]

### Even though it is implemented as a list, Queue was kept as a name as it is processed in a first-in, first-out basis. I would have simply used the queue written by the author of the article Josh linked, but it has more functionality than I need; for example I do not need "try to put" or "try to get" semantics.

[/font][/color]template class Queue{private: struct Node : public T { Node * m_ptrNext; Node(Node * ptrNext = NULL) : m_ptrNext(ptrNext) {} ~Node() {delete m_ptrNext;} } * m_ptrActive, * m_ptrInactive; public: Queue() { // // Start the queue with two elements // m_ptrActive = m_ptrInactive = new Node(); m_ptrInactive->m_ptrNext = new Node(m_ptrInactive); // // Make sure all threads have updated memory // std::atomic_signal_fence(std::memory_order_seq_cst); } ~Queue() { // // Make sure all threads have updated memory // std::atomic_signal_fence(std::memory_order_seq_cst); // // Set the 'next' pointer to NULL so the recursive nature of the Node d'tor will not // cause the destruction process to wrap around // Node * ptrNode = m_ptrInactive->m_ptrNext; m_ptrInactive->m_ptrNext = NULL; delete ptrNode; } template void Put(Functor functor) { //ASSERT(thread == producer) // // Check if the queue is full, in which case we must add a node // if ( m_ptrInactive->m_ptrNext == m_ptrActive ) { // // Between the above conditional and the following statement, the consumer can process // data and move the 'active' pointer, making the following node addition unnecessary. // However, there is no way to avoid it except with a mutex lock or other expensive // operation, and the extra node will get used anyway in the next call to Put() // // In the unlikely case that the 'active' pointer is advanced between the preceding // conditional and the Node c'tor below, we use 'inactive->next' as a parameter instead // of 'active' // m_ptrInactive->m_ptrNext = new Node(m_ptrInactive->m_ptrNext); } functor(static_cast(*m_ptrInactive)); std::atomic_signal_fence(std::memory_order_release); m_ptrInactive = m_ptrInactive->m_ptrNext; } template void Get(Functor refFunctor) { //ASSERT(thread == consumer) // // These is no [good] reason to fence here, as it is optimal to let the CPU handle memory as it // naturally does. The producer thread may not see our memory updates right away and subsequently // add extra nodes when it doesn't have to, but any extra nodes will be used anyway in subsequent // calls to Put(). // while ( m_ptrActive != m_ptrInactive ) { refFunctor(static_cast(*m_ptrActive)); m_ptrActive = m_ptrActive->m_ptrNext; } } // // For accurate results, call this from the producer thread // size_t SizeAll() { // Count from inactive -> inactive size_t count = 1; for (Node * ptrNode = m_ptrActive->m_ptrNext; ptrNode != m_ptrActive; ptrNode = ptrNode->m_ptrNext) ++count; return count; } // // Results may be inaccurate regardless of which thread calls this // size_t SizeActive() { // Count from active -> inactive size_t count = 0; for (Node * ptrNode = m_ptrActive; ptrNode != m_ptrInactive; ptrNode = ptrNode->m_ptrNext) ++count; return count; }};
The calls to [font='courier new']std::atomic_signal_fence(...)[/font] will have to be rewritten for compilers that do not support C++11. In my code I do not directly call these, but instead call a library that mimics the code in the article linked by Josh. I changed them here as I do not want to include my entire library.

An assumption made is that a [font='courier new']Queue[/font] object will not be destroyed without coordination between threads (e.g. one waits for the other to finish). In other words, the destructor will clobber concurrent calls to [font='courier new']Put()[/font]/[font='courier new']Get()[/font].

A caveat is that T objects are not destroyed until the [font='courier new']Queue[/font] object is destroyed. This is by design, since my particular implementation benefits from it. However, it can be trivially changed by:

• In [font='courier new']Node[/font]: adding [font='courier new']char object[sizeof(T)][/font] and removing the T inheritance
• in [font='courier new']Put()[/font]: calling [font='courier new']new (node->object) T()[/font] and changing the functor parameter to [font='courier new']static_cast(node->object)[/font]
• in [font='courier new']Get()[/font]: changing the functor parameter to [font='courier new']static_cast(node->object)[/font] and calling [font='courier new']static_cast(node->object)->T::~T()[/font]

(syntax may not be correct, but you get the idea)

-Josh

-Josh

Thanks for the info!  I knew there must be something I'm missing.  I've read the article you linked, as well as other related articles, and will adjust my code to account for it.  However, my "real" job has taken priority for now and I will update this when I am able to.

## Create an account

Register a new account


text:
# GATE Questions & Answers of Maxima and minima

## What is the Weightage of Maxima and minima in GATE Exam?

Total 8 Questions have been asked from Maxima and minima topic of Calculus subject in previous GATE papers. Average marks 1.50.

For, the maximum value of the function $f\left(t\right)={e}^{-t}-2{e}^{-2t}$ occurs at

The maximum value of the function occurs at x =______.

The maximum value of $f\left(x\right)=2{x}^{3}-9{x}^{2}+12x-3$ in the interval $0\le x\le 3$ is _______.

The maximum value of $\theta$ until which the approximation $\mathrm{sin}\theta \approx \theta$ holds to within 10% error is

The maximum value of f(x) = x3 - 9x2 + 24x + 5 in the interval [1, 6] is

If ey=${x}^{\frac{1}{x}}$ then y has a

format: plain


text:
# Publishing house / Banach Center Publications / All volumes

## Intersection-theoretical computations on ${\οverline M}_{g}$

### Volume 36 / 1996

Banach Center Publications 36 (1996), 71-81 DOI: 10.4064/-36-1-71-81

#### Abstract

In this paper we explore several concrete problems, all more or less related to the intersection theory of the moduli space of (stable) curves, introduced by Mumford [Mu 1].

• Carel Faber

## Search for IMPAN publications

Query phrase too short. Type at least 4 characters.


text:
[This article was first published on Fear and Loathing in Data Science, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

# NFL Draft 2014

It can’t be easy being a Jacksonville Jaguars fan. It seems that management has learned nothing from the Blaine Gabbert debacle. By that I mean I’m not impressed with their first round pick Blake Bortles. Bucky Brooks of NFL.com called him a “developmental prospect”. Developmental? Is that what you want from the third overall pick? I hate to say it but I have to agree with Skip Bayless that Bortles is the new Gabbert in J-Ville. We shall see soon enough if I will eat these words!
At any rate, I’ve downloaded draft data from the web and you can explore the draft at your own leisure. I scrapped it off of wikipedia at this link: http://en.wikipedia.org/wiki/2014_NFL_Draft
I put together some code to get you on your way to exploring

attach(nfldraft)
str(nfldraft)
## 'data.frame':    256 obs. of  8 variables:
##  $round : int 1 1 1 1 1 1 1 1 1 1 ... ##$ pick      : int  1 2 3 4 5 6 7 8 9 10 ...
##  $team : Factor w/ 32 levels "Arizona Cardinals",..: 13 29 15 4 23 2 30 8 18 11 ... ##$ player    : Factor w/ 256 levels "Aaron Colvin ",..: 96 89 25 204 147 97 178 131 12 84 ...
##  $position : Factor w/ 18 levels "C","CB","DE",..: 3 11 13 18 9 11 18 2 9 17 ... ##$ college   : Factor w/ 113 levels "Alabama","Arizona",..: 86 6 99 15 12 95 95 71 100 62 ...
##  $conference: Factor w/ 24 levels "ACC","Big 12",..: 21 21 24 1 11 21 21 2 17 1 ... ##$ notes     : Factor w/ 88 levels "","from Arizona[R1 - 5]",..: 1 86 1 20 1 1 1 51 9 1 ...
names(nfldraft)
## [1] "round"      "pick"       "team"       "player"     "position"
## [6] "college"    "conference" "notes"
mytable = table(position, round)  #create a table of player position and round
selected
mytable
##         round
## position 1 2 3 4 5 6 7
##      C   0 1 2 2 2 2 1
##      CB  5 1 2 9 4 7 5
##      DE  2 3 3 2 5 3 4
##      DT  2 3 4 3 3 1 4
##      FB  0 0 0 0 0 1 1
##      FS  0 0 0 0 0 0 2
##      G   0 1 6 1 4 2 0
##      K   0 0 0 0 0 0 2
##      LB  5 3 3 5 6 2 7
##      OLB 0 0 0 0 2 1 0
##      OT  5 4 3 1 1 3 4
##      P   0 0 0 0 0 1 0
##      QB  3 2 0 2 2 5 0
##      RB  0 3 5 5 0 4 2
##      S   4 1 2 4 3 1 0
##      SS  0 0 0 0 0 1 2
##      TE  1 3 3 0 1 0 2
##      WR  5 7 3 6 3 5 5
margin.table(mytable)  #generic table with sum...not very useful
## [1] 256
margin.table(mytable, 1)  #sum of positions selected
## position
##   C  CB  DE  DT  FB  FS   G   K  LB OLB  OT   P  QB  RB   S  SS  TE  WR
##  10  33  22  20   2   2  14   2  31   3  21   1  14  19  15   3  10  34

margin.table(mytable, 2)  #sum of players selected by round
## round
##  1  2  3  4  5  6  7
## 32 32 36 40 36 39 41

mosaicplot(mytable, main = "Position by Round", xlab = "Position",
ylab = "Round", cex.axis = 1)  #you can use mosaicplot to graphically
represent the data in the table

What if you want to drill-down on a specific team or the like? Here is some simple code to examine a specific team, in this case the Colts:
colts = nfldraft[which(nfldraft$team == "Indianapolis Colts"), ] #select the rows of data unique to the Colts colts.table = table(colts$round, colts\$position)

margin.table(colts.table, 2)
##
##   C  CB  DE  DT  FB  FS   G   K  LB OLB  OT   P  QB  RB   S  SS  TE  WR
##   0   0   1   0   0   0   0   0   1   0   2   0   0   0   0   0   0   1

barplot(colts.table)

There you have it. With some quick modifications to the above, you could produce tables examining players selected by conference, college etc.


text:
# Moore–Smith convergence; Universal nets

I am looking at John Kelley's General Topology. This is exercise J from chapter $2$. I seem to be having trouble with problems c) and d).

c) Prove the following

Lemma: If $S$ is a net in $X$, then there exists a family $C$ of subsets of $X$ such that:

1) $S$ falls often in each element of $C$.

2) The intersection of any two elements of $C$ stays in $C$.

3) $(\forall A\subset X)(A\in C \lor X\setminus A\in C)$

HINT: Show that if the family C is maximal regarding the first two properties, then the third one holds. (I believe maximal means maximal regarding set theoretic inclusion.)

d)

Prove that every net has a universal subnet.

A side question is why if $f:X \to Y$ and $S$ is a universal net in X then $f\circ S$ is a universal net in $Y$. Some may deem it trivial but I could not quite get convinced.

p.s. I apologize for any confusion of terminology as I am translating my Bulgarian copy of the textbook, and I don't have any mathematical dictionaries. Corrections are welcome.

Edit: The book advices to use theorem 2.5 to prove d).

Lemma 2.5: Let $S$ be a net and $A$ a family of sets such that the intersection of any two elements of $A$ contains and elements of $A$, and $S$ is often in each element of $A$. Then there is a subnet of $S$ that is almost completely in each element of $A$.

## 1 Answer

I’ll start with (c).

Let $\langle D,\le\rangle$ be the directed set on which $S$ is based. For each $d\in D$ let $T_d=\{S(e):d\le e\in D\}$, and let $\mathscr{C_0}=\{C\subseteq X:C\supseteq T_d\text{ for some }d\in D\}$. In words, $T_d$ is the tail of $S$ determined by the element $d\in D$, and $\mathscr{C_0}$ is the family of subsets of $X$ that contain some tail of $S$.

1. Let $C\in\mathscr{C_0}$ and $d\in D$. There is an $e\in D$ such that $C\supseteq T_e$, and there is an $e'\in D$ such that $d,e\le e'$, and clearly $S(e')\in T_d\subseteq C$. Thus, $S$ is frequently in $C$.

2. A similar argument shows that $\mathscr{C_0}$ is closed under finite intersections. If $C_0,C_1\in\mathscr{C_0}$, there are $d_0,d_1\in D$ such that $C_i\supseteq T_{d_i}$ for $i=0,1$. Choose $d\in D$ so that $d_0,d_1\le d$; then $T_d\subseteq T_{d_0}\cap T_{d_1}\subseteq C_0\cap C_1$, so $C_0\cap C_1\in\mathscr{C_0}$.

Now let $\mathscr{C}$ be a maximal (with respect to $\subseteq$) subset of $\wp(X)$ containing $\mathscr{C}_0$ and satisfying (1) and (2). You can use Zorn’s lemma or transfinite recursion to get $\mathscr{C}$; I can add either of these arguments if you like.

Let $A\subseteq X$ be arbitrary, and suppose that $A\cap C\ne\varnothing$ for all $C\in\mathscr{C}$. Let $\mathscr{F}=\langle\mathscr{C}\cup\{A\}\rangle$, the filter generated by $\mathscr{C}\cup\{A\}$; clearly $\mathscr{F}$ satisfies (2). If $\mathscr{F}$ does not satisfy (1), it must be because $T_d\cap C\cap A=\varnothing$ for some $d\in D$ and $C\in\mathscr{C}$. But $T_d\cap C\in\mathscr{C}$, so this is impossible, and therefore $\mathscr{F}$ satisfies (1) as well as (2). It follows from the maximality of $\mathscr{C}$ that $\mathscr{F}=\mathscr{C}$ and hence that $A\in\mathscr{C}$.

Corrected paragraph: Now suppose that $A\cap C_0=\varnothing$ for some $C_0\in\mathscr{C}$, and let $B=X\setminus A$. Let $C\in\mathscr{C}$ be arbitrary, and let $C_1=C_0\cap C\in\mathscr{C}$. Then $A\cap C_1=\varnothing$, and $S$ is frequently in $C_1$, so $S$ is frequently in $C_1\cap B\subseteq C\cap B$. In particular $C\cap B\ne\varnothing$ for all $C\in\mathscr{C}$, and by the previous paragraph we must have $B\in\mathscr{C}$. Thus, $\mathscr{C}$ satisfies (3) as well as (1) and (2).

For (d), apply Lemma (not Theorem) $2.5$ of your edit to the family $\mathscr{C}$ to get a subset $S'$ of $S$ that is eventually in each $C\in\mathscr{C}$. Then by (3) you know that for any $A\subseteq X$, $S'$ is eventually in $A$ or eventually in $X\setminus A$, so $S'$ is universal.

Finally, let $f:X\to Y$ be arbitrary, and let $S:D\to X$ be a universal net. Let $A\subseteq Y$ be arbitrary. Then $S$ is eventually in either $f^{-1}[A]$ or $X\setminus f^{-1}[A]$. That is, there is a $d\in D$ such that either $T_d\subseteq f^{-1}[A]$, or $T_d\subseteq X\setminus f^{-1}[A]$. In the first case $f[T_d]\subseteq A$, so $f\circ S$ is eventually in $A$. In the second case we use the fact that $X\setminus f^{-1}[A]=f^{-1}[Y\setminus A]$ to argue similarly that $f[T_d]\subseteq Y\setminus A$ and hence that $f\circ S$ is eventually in $Y\setminus A$. Since one of the cases must apply, $f\circ S$ is universal.

• Thank you, Brian. I am familiar with Zorn's lemma. Let me show as exercise, that $\subseteq$ is a partial order and each chain has an upper bound in the desired set. Risking looking stupid I wanted to ask how it follows that each chain has a universal sub-chain now. Given any net can we construct the universal subnet? – superAnnoyingUser Mar 6 '13 at 16:08
• @George: I’m not sure that I understand your question. Once you know that each chain has an upper bound, you know that the partial order has a maximal element, which you then take to be $\mathscr{C}$. What do you mean by a universal subchain of a chain in the partial order? – Brian M. Scott Mar 6 '13 at 16:11
• Yes, precisely, once I know each chain has an upper bound I can use Zorn's lemma. What I meant to ask is how to prove that each net has a universal sub-net, but you have already added that. Excuse my mistake. – superAnnoyingUser Mar 6 '13 at 16:40
• @George: That follows immediately from (c) and Lemma $2.5$: see the second-last paragraph of my answer. – Brian M. Scott Mar 6 '13 at 16:42
• I'm having trouble finding upper bounds for the chains, to show that Zorn's lemma is applicable. Should I argue by admitting the contrary? Where does the contradiction stem from? – superAnnoyingUser Mar 6 '13 at 21:12


text:
# Methodology¶

Below we describe the methods implemented by kPAL.

Figure 1

## k-mer counting¶

The first step in any k-mer analysis is the generation of a profile (Figure 1), which is constructed by the counting algorithm. The efficiency of the algorithm is improved by encoding the DNA string in binary following this map:

Base Binary
A 00
C 01
G 10
T 11

Subsequently, the binary encoded k-mers are used as the index of a count table. This can be achieved by the concatenation of the binary code for each nucleotide in a given DNA string. This procedure eliminates the need to store the actual k-mer sequences since they can be retrieved from decoding the offset in the count table. The binary code for each nucleotide is chosen in such a way that the complement of the nucleotide can be calculated using the binary NOT operator. The counting algorithm returns a profile that holds observed counts for all possible substrings of length k that can be stored for other analyses.

## Distance metrics¶

Since the k-mer profile is in essence a vector of almost independent values, we can use any metric defined for vectors to calculate the distance between two profiles. We have implemented two metrics which are the standard Euclidian distance measure and the multiset distance measure (1). The last metric is parameterised by a function that reflects the distance between a pair. We have implemented two pairwise distance functions (2) and (3).

For a multiset $$X$$, let $$S(X)$$ denote its underlying set. For multisets $$X, Y$$ with $$S(X), S(Y) \subseteq \{1, 2, \ldots, n\}$$ we define:

(1)$d_f = \frac{\sum^n_{i=1} f(x_i, y_i)}{|S(X) \cup S(Y)| + 1}$
(2)$f_1(x, y) = \frac{|x - y|}{(x + 1)(y + 1)}$
(3)$f_2(x, y) = \frac{|x - y|}{x + y + 1}$

## Strand balance¶

When analysing sequencing data, which frequently consist of reads from both strands (e.g., due to non strand-specific sample preparation or paired-end sequencing), we can assume that the chance of observing a fragment originating from the plus and minus strands are equal. Additionally, if the sequencing depth is high enough, we expect a balance between the frequencies of k-mers and their reverse complement in a given k-mer profile. Every type of NGS data has an expected balance (i.e., SAGE is not expected to yield a balanced profile while whole genome shotgun sequencing is expected to have a perfectly balanced frequency between k-mers and their reverse complement). Thus, k-mer balance can indicate the quality of NGS data in respect to over-amplification, insufficient number of reads, or poor capture performance in the case of whole exome sequencing.

Figure 2

To calculate the balance, first we observe that every k-mer has a reverse complement. One of these is lexicographically smaller (or equal in the case of a palindrome) than the other. We first split a profile into two vectors, $$A = (a_0, a_1, \ldots)$$ and $$B = (b_0, b_1, \ldots)$$ and where $$b_i$$ represents the reverse complement of $$a_i$$ and vice versa. The distance between these vectors can be calculated in the same way as described for pairwise comparison of two full k-mer profiles (Figure 2).

Additionally, kPAL can forcefully balance the k-mer profiles (if desired) by adding the values of each k-mer to its reverse complement. This procedure can improve distance calculation if the sequencing depth is too low.

## Profile shrinking¶

Figure 3

A profile for a certain k-mer length contains information about k-mers of smaller lengths. This can be seen from the fact that a word $$w$$ over an alphabet $$\mathcal{A}$$ has $$|\mathcal{A}|$$ possible suffixes of length one. To calculate the number of occurrences of $$w$$, we simply need to calculate $$\sum_{i \in \mathcal{A}} count(w.i)$$. This only holds when the k-mer length is relatively small compared to the length of the original sequences. Indeed, if a sequence of length $$l$$ is used for counting at length $$k$$, then $$(l - k + 1)$$ k-mers are encountered per sequence. However, shrinking of a profile will yield $$(l - k)$$ k-mers. Usually, this border effect is small enough to ignore, but should be taken into consideration when counting in large amounts of small (approaching length $$k$$) sequences. Shrinking is useful when trying to estimate the best $$k$$ for a particular purpose. One can start with choosing a relatively large $$k$$ and then reuse the generated profile to construct a profile of smaller $$k$$ sizes (Figure 3).

## Scaling and smoothing¶

Ideally, the samples that are used to generate profiles are sequenced with the same sample preparation, on the same platform, and most importantly at sufficient depth. However, in practice, this is rarely the case. When two similar samples are sequenced at insufficient depth, it will be reflected in a k-mer profile by zero counts for k-mers that are not expected to be nullomers. While this is not a problem in itself, the fact that most sequencing procedures have a random selection of sequencing fragments will result in a random distribution of these zero counts. When comparing two profiles, the pairwise distances will be artificially large. Scaling the profiles can partially compensate for differences in the sequencing depth but cannot account for nullomers since no distinction can be made between true missing words and artificially missing words. An obvious solution would be to shrink the profile until nullomers are removed. This method is valid as long as all zero counts reflect artificial nullomers. Otherwise, shrinking will reduce the specificity and does not reflect the true complexity of the sequenced genome. To deal with this problem, we have developed the pairwise smoothing function. This method locally shrinks a profile only whe necessary. In this way, we retain information if it is available in both profiles and discard missing data (Figure 4).

Figure 4

Let $$P$$ and $$Q$$ be sub-profiles of words over an alphabet $$\mathcal{A}$$ of length $$l$$ (with $$l$$ devidable by $$|\mathcal{A}|$$). Let $$t$$ be a user-defined threshold and let $$f$$ be a method of summarizing a profile. If $$min(f(P), f(Q)) > t$$ we divide the profiles in $$|\mathcal{A}|$$ equal parts and recursively repeat the procedure for each part. If this is not the case, we collapse both $$P$$ and $$Q$$ to one word. Implemented methods of summarizing are minimum, mean, and median. In Figure 4 we show an example of how smoothing might work. We have chosen $$f = min$$ and $$t = 0$$ as default parameters.With this method, we can count with a large k-mer length $$k$$ and retain the overall specificity of the profile since this method can automatically select the optimal choice of $$k$$ locally.


text:
# American Institute of Mathematical Sciences

• Previous Article
Approximate models for stochastic dynamic systems with velocities on the sphere and associated Fokker--Planck equations
• KRM Home
• This Issue
• Next Article
A kinetic approach to error estimate for nonautonomous anisotropic degenerate parabolic-hyperbolic equations
September  2014, 7(3): 493-507. doi: 10.3934/krm.2014.7.493

## Hysteretic behavior of a moment-closure approximation for FENE model

 1 Division of Mathematical Models, National Institute for Mathematical Sciences, Daejeon, 305-811, South Korea

Received  February 2014 Revised  May 2014 Published  July 2014

We discuss hysteretic behaviors of dilute viscoelastic polymeric fluids with moment-closure approximation approach in extensional/enlongational flows. Polymeric fluids are modeled by the finite extensible nonlinear elastic (FENE) spring dumbbell model. Hysteresis is one of key features to describe FENE model. We here investigate the hysteretic behavior of FENE-D model introduced in [Y. Hyon et al., Multiscale Model. Simul., 7(2008), pp.978--1002]. The FENE-D model is established from a special equilibrium solution of the Fokker-Planck equation to catch extreme behavior of FENE model in large extensional flow rates. Since the hysteresis of FENE model can be seen during a relaxation in simple extensional flow employing the normal stress/the elongational viscosity versus the mean-square extension, we simulate FENE-D in simple extensional flows to investigate its hysteretic behavior comparing to FENE-P, FENE-L [G. Lielens et al., J. Non-Newtonian Fluid Mech., 76(1999), pp.249--279]. The FENE-P is a well-known pre-averaged approximated model, and it shows a good agreement to macroscopic induced stresses. However, FENE-P does not catch any hysteretic phenomenon. In contrast, the FENE-L shows a better hysteretic behavior than the other models to FENE, but it has a limitation for macroscopic induced stresses in large shear rates. On the other hand, FENE-D presents a good agreement to macroscopic induced stresses even in large shear rates, and moreover, it shows a hysteretic phenomenon in certain large flow rates.
Citation: YunKyong Hyon. Hysteretic behavior of a moment-closure approximation for FENE model. Kinetic and Related Models, 2014, 7 (3) : 493-507. doi: 10.3934/krm.2014.7.493
##### References:
 [1] R. B. Bird, R. C. Armstrong and O. Hassager, Dynamics of Polymeric Fluids, Vol. 1, Fluid Mechanics, John Wiley & Sons, New York, 1977. [2] R. B. Bird, O. Hassager, R. C. Armstrong and C. F. Curtiss, Dynamics of Polymeric Fluids, Vol. 2, Kinetic Theory, John Wiley & Sons, New York, 1977. [3] C. Chauviere and A. Lozinski, Simulation of dilute polymer solutions using a Fokker-Planck equation, Computers & fluids, 33 (2004), 687-696. doi: 10.1016/j.compfluid.2003.02.002. [4] M. Doi and S. F. Edwards, The Theory of Polymer Dynamics, Clarendon Press, Oxford, UK, 1986. [5] P. S. Doyle, E. S. G. Shaqfeh, G. H. McKinley and S. H. Spiegelberg, Relaxation of dilute polymer solutions following extensional flow, J. Non-Newtonian Fluid Mech., 76 (1998), 79-110. doi: 10.1016/S0377-0257(97)00113-4. [6] Q. Du, C. Liu and P. Yu, FENE Dumbbell model and its several linear and nonlinear closure approximations, Multiscale Model. Simul., 4 (2005), 709-731. doi: 10.1137/040612038. [7] M. Gurtin, An Introduction to Continuum Mechanics, Academic Press, New York, 1981. [8] M. Herrchen and H. C. Öttinger, A detail comparison of various FENE dumbbell models, J. Non-Newtonian Fluid Mech., 68 (1997), 17-42. doi: 10.1016/S0377-0257(96)01498-X. [9] Y. Hyon, Q. Du and C. Liu, An enhanced macroscopic closure approximation to the micro-macro FENE model for polymeric materials, Multiscale Model. Simul., 7 (2008), 978-1002. doi: 10.1137/070708287. [10] M. Hulsen, A. van Heel and B. van dent Brule, Simulation of viscoelatsic flow using Brownian configuration fields, J. Non-Newtonian Fluid Mech., 70 (1997), 79-101. [11] B. Jourdain, C. Le Bris and T. Lelievre, On a variance reduction technique for the micro-macro simulations of polymeric fluids, J. Non-Newtonian Fluid Mech., 122 (2004), 91-106. doi: 10.1016/j.jnnfm.2003.09.006. [12] B. Jourdain, T. Lelievre and C. Le Bris, Existence of solution for a micro-macro model of polymeric fluid: The FENE model, J. Funct. Anal., 209 (2004), 162-193. doi: 10.1016/S0022-1236(03)00183-6. [13] R. Keunings, On the Peterlin approximation for finitely extensible dumbbells, J. Non-Newtonian Fluid Mech., 68 (1997), 85-100. doi: 10.1016/S0377-0257(96)01497-8. [14] P. E. Kloeden and E. Platen, Numerical Solution of Stochastic Differential Equations, Springer, Berlin, 1992. doi: 10.1007/978-3-662-12616-5. [15] M. Laso and H. C. Ottinger, Calculation of viscoelastic flow using molecular models: The connffessit approach, J. Non-Newtonian Fluid Mech., 47 (1993), 1-20. doi: 10.1016/0377-0257(93)80042-A. [16] G. Lielens, P. Halin, I. Jaumain, R. Keunings and V. Legat, New closure approximations for the kinetic theory of finitely extensible dumbbells, J. Non-Newtonian Fluid Mech., 76 (1998), 249-279. doi: 10.1016/S0377-0257(97)00121-3. [17] G. Lielens, R. Keunings and V. Legat, The FENE-L and FENE-LS closure approximations to the kinetic theory of finitely extensible dumbbells, J. Non-Newtonian Fluid Mech., 87 (1999), 179-196. doi: 10.1016/S0377-0257(99)00063-4. [18] F. H. Lin, C. Liu and P. Zhang, On a micro-macro model for polymeric fluids near equilibrium, Comm. Pure Appl. Math., 60 (2007), 838-866. doi: 10.1002/cpa.20159. [19] H. C. Öttinger, Stochastic Processes in Polymeric Fluids, Tools and Examples for Developing Simulation Algorithms, Springer-Verlag, Berlin, 1996. doi: 10.1007/978-3-642-58290-5. [20] R. Owens and T. Phillips, Computational Rheology, Imperial College Press, London, 2002. doi: 10.1142/9781860949425. [21] R. Prabhakar and J. R. Prakash, Gaussian approximation for finitely extensible bead-spring chains with hydrodynamic interaction, J. Rheol., 50 (2006), 561-593. doi: 10.1122/1.2206715. [22] R. Sizaire, G. Lielens, I. Jaumain, R. Keunings and V. Legat, On the hysteretic behaviour of dilute polymer solutions in relaxation following extensional flow, J. Non-Newtonian Fluid Mech., 82 (1999), 233-253. doi: 10.1016/S0377-0257(98)00164-5. [23] H. Wang, K. Li and P. Zhang, Crucial properties of the moment closure model FENE-QE, J. Non-Newtonian Fluid Mech., 150 (2008), 80-92. doi: 10.1016/j.jnnfm.2007.10.013. [24] P. Yu, Q. Du and C. Liu, From micro to macro dynamics via a new closure approximation to the FENE model of polymeric fluids, Multiscale Model. Simul., 3 (2005), 895-917. doi: 10.1137/030602794.

show all references

##### References:
 [1] R. B. Bird, R. C. Armstrong and O. Hassager, Dynamics of Polymeric Fluids, Vol. 1, Fluid Mechanics, John Wiley & Sons, New York, 1977. [2] R. B. Bird, O. Hassager, R. C. Armstrong and C. F. Curtiss, Dynamics of Polymeric Fluids, Vol. 2, Kinetic Theory, John Wiley & Sons, New York, 1977. [3] C. Chauviere and A. Lozinski, Simulation of dilute polymer solutions using a Fokker-Planck equation, Computers & fluids, 33 (2004), 687-696. doi: 10.1016/j.compfluid.2003.02.002. [4] M. Doi and S. F. Edwards, The Theory of Polymer Dynamics, Clarendon Press, Oxford, UK, 1986. [5] P. S. Doyle, E. S. G. Shaqfeh, G. H. McKinley and S. H. Spiegelberg, Relaxation of dilute polymer solutions following extensional flow, J. Non-Newtonian Fluid Mech., 76 (1998), 79-110. doi: 10.1016/S0377-0257(97)00113-4. [6] Q. Du, C. Liu and P. Yu, FENE Dumbbell model and its several linear and nonlinear closure approximations, Multiscale Model. Simul., 4 (2005), 709-731. doi: 10.1137/040612038. [7] M. Gurtin, An Introduction to Continuum Mechanics, Academic Press, New York, 1981. [8] M. Herrchen and H. C. Öttinger, A detail comparison of various FENE dumbbell models, J. Non-Newtonian Fluid Mech., 68 (1997), 17-42. doi: 10.1016/S0377-0257(96)01498-X. [9] Y. Hyon, Q. Du and C. Liu, An enhanced macroscopic closure approximation to the micro-macro FENE model for polymeric materials, Multiscale Model. Simul., 7 (2008), 978-1002. doi: 10.1137/070708287. [10] M. Hulsen, A. van Heel and B. van dent Brule, Simulation of viscoelatsic flow using Brownian configuration fields, J. Non-Newtonian Fluid Mech., 70 (1997), 79-101. [11] B. Jourdain, C. Le Bris and T. Lelievre, On a variance reduction technique for the micro-macro simulations of polymeric fluids, J. Non-Newtonian Fluid Mech., 122 (2004), 91-106. doi: 10.1016/j.jnnfm.2003.09.006. [12] B. Jourdain, T. Lelievre and C. Le Bris, Existence of solution for a micro-macro model of polymeric fluid: The FENE model, J. Funct. Anal., 209 (2004), 162-193. doi: 10.1016/S0022-1236(03)00183-6. [13] R. Keunings, On the Peterlin approximation for finitely extensible dumbbells, J. Non-Newtonian Fluid Mech., 68 (1997), 85-100. doi: 10.1016/S0377-0257(96)01497-8. [14] P. E. Kloeden and E. Platen, Numerical Solution of Stochastic Differential Equations, Springer, Berlin, 1992. doi: 10.1007/978-3-662-12616-5. [15] M. Laso and H. C. Ottinger, Calculation of viscoelastic flow using molecular models: The connffessit approach, J. Non-Newtonian Fluid Mech., 47 (1993), 1-20. doi: 10.1016/0377-0257(93)80042-A. [16] G. Lielens, P. Halin, I. Jaumain, R. Keunings and V. Legat, New closure approximations for the kinetic theory of finitely extensible dumbbells, J. Non-Newtonian Fluid Mech., 76 (1998), 249-279. doi: 10.1016/S0377-0257(97)00121-3. [17] G. Lielens, R. Keunings and V. Legat, The FENE-L and FENE-LS closure approximations to the kinetic theory of finitely extensible dumbbells, J. Non-Newtonian Fluid Mech., 87 (1999), 179-196. doi: 10.1016/S0377-0257(99)00063-4. [18] F. H. Lin, C. Liu and P. Zhang, On a micro-macro model for polymeric fluids near equilibrium, Comm. Pure Appl. Math., 60 (2007), 838-866. doi: 10.1002/cpa.20159. [19] H. C. Öttinger, Stochastic Processes in Polymeric Fluids, Tools and Examples for Developing Simulation Algorithms, Springer-Verlag, Berlin, 1996. doi: 10.1007/978-3-642-58290-5. [20] R. Owens and T. Phillips, Computational Rheology, Imperial College Press, London, 2002. doi: 10.1142/9781860949425. [21] R. Prabhakar and J. R. Prakash, Gaussian approximation for finitely extensible bead-spring chains with hydrodynamic interaction, J. Rheol., 50 (2006), 561-593. doi: 10.1122/1.2206715. [22] R. Sizaire, G. Lielens, I. Jaumain, R. Keunings and V. Legat, On the hysteretic behaviour of dilute polymer solutions in relaxation following extensional flow, J. Non-Newtonian Fluid Mech., 82 (1999), 233-253. doi: 10.1016/S0377-0257(98)00164-5. [23] H. Wang, K. Li and P. Zhang, Crucial properties of the moment closure model FENE-QE, J. Non-Newtonian Fluid Mech., 150 (2008), 80-92. doi: 10.1016/j.jnnfm.2007.10.013. [24] P. Yu, Q. Du and C. Liu, From micro to macro dynamics via a new closure approximation to the FENE model of polymeric fluids, Multiscale Model. Simul., 3 (2005), 895-917. doi: 10.1137/030602794.
 [1] Anaïs Crestetto, Nicolas Crouseilles, Mohammed Lemou. Kinetic/fluid micro-macro numerical schemes for Vlasov-Poisson-BGK equation using particles. Kinetic and Related Models, 2012, 5 (4) : 787-816. doi: 10.3934/krm.2012.5.787 [2] Michael Herty, Christian Jörres, Albert N. Sandjo. Optimization of a model Fokker-Planck equation. Kinetic and Related Models, 2012, 5 (3) : 485-503. doi: 10.3934/krm.2012.5.485 [3] Jin Li, Jianhua Huang. Dynamics of a 2D Stochastic non-Newtonian fluid driven by fractional Brownian motion. Discrete and Continuous Dynamical Systems - B, 2012, 17 (7) : 2483-2508. doi: 10.3934/dcdsb.2012.17.2483 [4] Yunkyong Hyon, José A. Carrillo, Qiang Du, Chun Liu. A maximum entropy principle based closure method for macro-micro models of polymeric materials. Kinetic and Related Models, 2008, 1 (2) : 171-184. doi: 10.3934/krm.2008.1.171 [5] Hafedh Bousbih. Global weak solutions for a coupled chemotaxis non-Newtonian fluid. Discrete and Continuous Dynamical Systems - B, 2019, 24 (2) : 907-929. doi: 10.3934/dcdsb.2018212 [6] M. Bulíček, F. Ettwein, P. Kaplický, Dalibor Pražák. The dimension of the attractor for the 3D flow of a non-Newtonian fluid. Communications on Pure and Applied Analysis, 2009, 8 (5) : 1503-1520. doi: 10.3934/cpaa.2009.8.1503 [7] Linfang Liu, Tomás Caraballo, Xianlong Fu. Exponential stability of an incompressible non-Newtonian fluid with delay. Discrete and Continuous Dynamical Systems - B, 2018, 23 (10) : 4285-4303. doi: 10.3934/dcdsb.2018138 [8] Joseph G. Conlon, André Schlichting. A non-local problem for the Fokker-Planck equation related to the Becker-Döring model. Discrete and Continuous Dynamical Systems, 2019, 39 (4) : 1821-1889. doi: 10.3934/dcds.2019079 [9] Jong Yeoul Park, Jae Ug Jeong. Pullback attractors for a $2D$-non-autonomous incompressible non-Newtonian fluid with variable delays. Discrete and Continuous Dynamical Systems - B, 2016, 21 (8) : 2687-2702. doi: 10.3934/dcdsb.2016068 [10] Guowei Liu, Rui Xue. Pullback dynamic behavior for a non-autonomous incompressible non-Newtonian fluid. Discrete and Continuous Dynamical Systems - B, 2018, 23 (6) : 2193-2216. doi: 10.3934/dcdsb.2018231 [11] Aneta Wróblewska-Kamińska. Local pressure methods in Orlicz spaces for the motion of rigid bodies in a non-Newtonian fluid with general growth conditions. Discrete and Continuous Dynamical Systems - S, 2013, 6 (5) : 1417-1425. doi: 10.3934/dcdss.2013.6.1417 [12] Li Fang, Zhenhua Guo. Zero dissipation limit to rarefaction wave with vacuum for a one-dimensional compressible non-Newtonian fluid. Communications on Pure and Applied Analysis, 2017, 16 (1) : 209-242. doi: 10.3934/cpaa.2017010 [13] Sylvain De Moor, Luis Miguel Rodrigues, Julien Vovelle. Invariant measures for a stochastic Fokker-Planck equation. Kinetic and Related Models, 2018, 11 (2) : 357-395. doi: 10.3934/krm.2018017 [14] Marco Torregrossa, Giuseppe Toscani. On a Fokker-Planck equation for wealth distribution. Kinetic and Related Models, 2018, 11 (2) : 337-355. doi: 10.3934/krm.2018016 [15] José Antonio Alcántara, Simone Calogero. On a relativistic Fokker-Planck equation in kinetic theory. Kinetic and Related Models, 2011, 4 (2) : 401-426. doi: 10.3934/krm.2011.4.401 [16] Florian Schneider, Andreas Roth, Jochen Kall. First-order quarter-and mixed-moment realizability theory and Kershaw closures for a Fokker-Planck equation in two space dimensions. Kinetic and Related Models, 2017, 10 (4) : 1127-1161. doi: 10.3934/krm.2017044 [17] Simon Plazotta. A BDF2-approach for the non-linear Fokker-Planck equation. Discrete and Continuous Dynamical Systems, 2019, 39 (5) : 2893-2913. doi: 10.3934/dcds.2019120 [18] Anton Arnold, Beatrice Signorello. Optimal non-symmetric Fokker-Planck equation for the convergence to a given equilibrium. Kinetic and Related Models, , () : -. doi: 10.3934/krm.2022009 [19] Francesca Marcellini. Free-congested and micro-macro descriptions of traffic flow. Discrete and Continuous Dynamical Systems - S, 2014, 7 (3) : 543-556. doi: 10.3934/dcdss.2014.7.543 [20] Yuan Gao, Guangzhen Jin, Jian-Guo Liu. Inbetweening auto-animation via Fokker-Planck dynamics and thresholding. Inverse Problems and Imaging, 2021, 15 (5) : 843-864. doi: 10.3934/ipi.2021016

2021 Impact Factor: 1.398


text:
# Which gas has the greatest kinetic energy? a) neon at a temperature of 200k b) neon at a...

## Question:

Which gas has the greatest kinetic energy?

a) neon at a temperature of 200k

b) neon at a temperature of 300k

c) neon at a temperature of 400k

d) neon at a temperature of 500k

e) neon at a temperature of 600k

f) none of the above (they all have the same kinetic energy)

## Average Kinetic Energy:

The formula for the average kinetic energy of the given gas molecules that we are going to use in this problem is shown below:

{eq}\displaystyle K.E.=\frac{3}{2}kT {/eq}, where,

• {eq}k {/eq} is the Boltzmann's constant.
• {eq}T {/eq} is the value of the temperature of the gas molecule.

## Answer and Explanation:

The given values of the temperatures of the neon gas are:

{eq}T_1=200\ K\\ T_2=300\ K \\ T_3=400\ K\\ T_4=500\ K\\ T_5=600\ K {/eq}

In the formula of the average kinetic energy of the gas molecule, {eq}\displaystyle \frac{3}{2}k {/eq} is the constant so the kinetic energy is directly proportional to the temperature.

{eq}\displaystyle K.E.\propto T {/eq}

The greater kinetic energy of the given gas will be obtained by the greater value of the given temperatures that means the kinetic energy will be greater at {eq}600 K {/eq}.

Thus, option (e) is correct.


text:
## lördag 6 augusti 2016

### New Quantum Mechanics 12: H2 Non Bonded

Here are results for two hydrogen atoms forming an H2 molecule at kernel distance R = 1.4 at minimal total energy of -1.17 and a non-bonded molecule for larger distance approaching full separation for R larger than 6-10 at a total energy of -1. The results fit quite well with table data listed below.

The computations were made (on an iPad) in cylindrical coordinates in rotational symmetry around molecule axis on a mesh of 2 x 400 along the axis and 100 in the radial direction. The electrons are separated by a plane perpendicular to the axis through the the molecule center, with a homogeneous Neumann boundary condition for each electron half space Schrödinger equation. The electronic potentials are computed by solving a Poisson equation in full space for each electron.

PS To capture energy approach to -1 as R becomes large, in particular the (delicate) $R^{-6}$ dependence of the van der Waal force, requires a (second order) perturbation analysis, which is beyond the scope of the basic model under study with $R^{-1}$ dependence of kernel and electronic potential energies.

%TABLE II. Born–Oppenheimer total, E
%Relativistic energies of the ground state of the hydrogen molecule
%L. Wolniewicz
%Citation: J. Chem. Phys. 99, 1851 (1993);
for two hydrogen atoms separated by a distance R bohr

R    energy
0.20 2.197803500
0.30 0.619241793
0.40 -0.120230242
0.50 -0.526638671
0.60 -0.769635353
0.80 -1.020056603
0.90 -1.083643180
1.00 -1.124539664
1.10 -1.150057316
1.20 -1.164935195
1.30 -1.172347104
1.35 -1.173963683
1.40 -1.174475671
1.45 -1.174057029
1.50 -1.172855038
1.60 -1.168583333
1.70 -1.162458688
1.80 -1.155068699
2.00 -1.138132919
2.20 -1.120132079
2.40 -1.102422568
2.60 -1.085791199
2.80 -1.070683196
3.00 -1.057326233
3.20 -1.045799627
3.40 -1.036075361
3.60 -1.028046276
3.80 -1.021549766
4.00 -1.016390228
4.20 -1.012359938
4.40 -1.009256497
4.60 -1.006895204
4.80 -1.005115986
5.00 -1.003785643
5.20 -1.002796804
5.40 -1.002065047
5.60 -1.001525243
5.80 -1.001127874
6.00 -1.000835702
6.20 -1.000620961
6.40 -1.000463077
6.60 -1.000346878
6.80 -1.000261213
7.00 -1.000197911
7.20 -1.000150992
7.40 -1.000116086
7.60 -1.000090001
7.80 -1.000070408
8.00 -1.000055603
8.50 -1.000032170
9.00 -1.000019780
9.50 -1.000012855
10.00 -1.000008754
11.00 -1.000004506
12.00 -1.000002546


text:
# Differentiating Square Roots

Hi so I am new to calculus and need help with differentiation

The question is:
Differentiate the following function:

sqrt(x^2-8x+20)

So far I have gotten
=(x^2-8x+20)^(1/2)
=(1/2)(x^2-8x+20)^(-1/2) * 2x-8

I am unsure where to go from here
I know we are supposed to use the chain rule but I am still confused where to go after this step.

Thanks

Related Calculus and Beyond Homework Help News on Phys.org
Mark44
Mentor
Hi so I am new to calculus and need help with differentiation

The question is:
Differentiate the following function:

sqrt(x^2-8x+20)

So far I have gotten
=(x^2-8x+20)^(1/2)
=(1/2)(x^2-8x+20)^(-1/2) * 2x-8

I am unsure where to go from here
I know we are supposed to use the chain rule but I am still confused where to go after this step.

Thanks
You have
sqrt(x^2-8x+20)
=(x^2-8x+20)^(1/2)
Up to here, what you have done is rewrite the expression in a different form.

What you have below is the derivative of the expression above. It is not equal to what you started with, so you should not have =. This is the derivative, and it is mostly correct (you need parentheses around 2x-8.

=(1/2)(x^2-8x+20)^(-1/2) * 2x-8

Be sure to distinguish between the function you're differentiating and what you get when you differentiate (the deriviative). Here's one way:

y = sqrt(x^2-8x+20) = (x^2-8x+20)^(1/2)

dy/dx = (1/2)(x^2-8x+20)^(-1/2) * (2x-8)
= (1/2)(2x - 8)/(x^2 - 8x + 20)^(1/2) = (x - 4)/(x^2 - 8x + 20)^(1/2)

You can also write dy/dx as y'.

Thank-you!


text:
## Cryptology ePrint Archive: Report 2012/345

Breaking pairing-based cryptosystems using $\eta_T$ pairing over $GF(3^{97})$

Takuya Hayashi and Takeshi Shimoyama and Naoyuki Shinohara and Tsuyoshi Takagi

Abstract: There are many useful cryptographic schemes, such as ID-based encryption, short signature, keyword searchable encryption, attribute-based encryption, functional encryption, that use a bilinear pairing. It is important to estimate the security of such pairing-based cryptosystems in cryptography. The most essential number-theoretic problem in pairing-based cryptosystems is the discrete logarithm problem (DLP) because pairing-based cryptosystems are no longer secure once the underlining DLP is broken. One efficient bilinear pairing is the $\eta_T$ pairing defined over a supersingular elliptic curve $E$ on the finite field $GF(3^n)$ for a positive integer $n$. The embedding degree of the $\eta_T$ pairing is $6$; thus, we can reduce the DLP over $E$ on $GF(3^n)$ to that over the finite field $GF(3^{6n})$. In this paper, for breaking the $\eta_T$ pairing over $GF(3^n)$, we discuss solving the DLP over $GF(3^{6n})$ by using the function field sieve (FFS), which is the asymptotically fastest algorithm for solving a DLP over finite fields of small characteristics. We chose the extension degree $n=97$ because it has been intensively used in benchmarking tests for the implementation of the $\eta_T$ pairing, and the order (923-bit) of $GF(3^{6\cdot 97})$ is substantially larger than the previous world record (676-bit) of solving the DLP by using the FFS. We implemented the FFS for the medium prime case (JL06-FFS), and propose several improvements of the FFS, for example, the lattice sieve for JL06-FFS and the filtering adjusted to the Galois action. Finally, we succeeded in solving the DLP over $GF(3^{6\cdot 97})$. The entire computational time of our improved FFS requires about 148.2 days using 252 CPU cores. Our computational results contribute to the secure use of pairing-based cryptosystems with the $\eta_T$ pairing.

Category / Keywords: public-key cryptography / pairing-based cryptosystems, $\eta_T$ pairing, discrete logarithm problems, function filed sieve


text:
# Public decency and morality

This is what Supreme Court of India had to say when petition was filed to lift a ban in 1964 on Lady Chatterley’s Lover by D.H. Lawrence:

It is convenient to set out s. 292 of the Indian Penal Code at this stage:
“292. Sale of obscene books etc. : Whoever- (a) sells, lets to hire, distributes, publicly exhibits or in any manner puts into circulation, or for purposes of sale, hire, distribution, public exhibition or circulation, makes, produces or has in his possession any obscene book, pamphlet, paper, drawing, painting, representation or figure or any other obscene object whatsoever, or
(b) imports, exports or conveys any obscene object for any of the purposes aforesaid, or knowing or having reason to believe that such object will be sold, let to hire, distributed or publicly exhibited or in any manner put into circulation, or
(c) takes part in or receives profits from any business in the course of which he knows or has reason to believe that any such obscene objects are, for any of the purposes aforesaid, made, produced, purchased, kept, imported, exported, conveyed, publicly exhibited or in any manner put into circulation, or
(d) advertises or makes known by any means whatsoever that any person is engaged or is ready to engage in any act which is an offence under this section, or that any such obscene object can be procured from or through any person, or
(e) offers or attempts to do any act which is an offence -under this section,
19(1) All citizens shall have the right-
(a) to freedom of speech and expression; (2) Nothing -in sub-clause (a) of clause (1) shall affect the operation of any existing law, or prevent the State from making any law, in so far as such law imposes reasonable restrictions on the exercise of the right conferred by the said sub-clause in the interests of public order, decency or morality”
No doubt this article guarantees complete freedom of speech and expression but it also makes an exception in favour of existing laws which impose restrictions on the exercise of the right in the interests of public decency or morality.
Condemnation of obscenity depends as much upon the mores of the people as upon the individual. It is always a question of degree or as the lawyers are accustomed to say, of where the line is to be drawn. It is, however, clear that obscenity by itself has extremely “poor value in the-propagation of ideas, opinions and informations of public interest or profit.” When there is propagation of ideas, opinions and informations of public interest or profit, the approach to the problem may become different because then the interest of society may tilt the scales in favour of free speech and expression. It is thus that books on medical science with intimate illustrations and photographs, though in a sense immodest, are not considered to be obscene but the same illustrations and photographs collected in book form without the medical text would certainly be considered to be obscene.
“I think the test of obscenity is this, whether the tendency of the matter charged as obscenity is to deperave and corrupt those whose minds are open to such immoral influences, and into whose hands a publication of this sort may fall. . . . . it is quite certain that it would suggest to the minds of the young of either sex, or even to persons of more advanced years, thoughts of a most impure and libidinous character.”

He wants us to say that a book is not necessarily obscene because there is a word here or a word there, or a passage here and a passage there which may be offensive to particularly sensitive persons. He says that the overall effect of the book should be the test and secondly, that the book should only be condemned if it has no redeeming merit at all, for then it is “dirt for dirt’s sake”, or as Mr. Justice Frankfurter put it in his inimitable way “dirt for money’s sake.

We need not attempt to bowdlerize all literature and thus rob speech and expression of freedom. A balance should be maintained between freedom of speech and expression and public decency and morality but when the latter is substantially transgressed the former must give way.
The taboo on sex in art and literature which was more strict thirty-five years ago, seemed to him to corrode domestic and social life and his definite view was that a candid discussion of sex through art was the only catharsis for purifying and relieving the congested emotion is.
“The law seeks to protect not those who protect themselves, but those whose prurient minds take delight and sexual pleasures from erotic writings.”

The word “obscene” in the section is not limited to writings, pictures etc. intended to arouse sexual desire. At the same time the mere treating with sex and nudity in art and literature is not per se evidence of obscenity.
Exception. – This section does not extend to any book, pamphlet, writing, drawing or painting kept or used bona fide for religious purposes or any representation sculptured, engraved, painted or otherwise represented on or in any temple, or on any car used for the conveyance of idols, or kept or used for any religious purpose.”

This was I think long back, but the views have not changed ever since the. The idea that somethings are bad for everyone is something which all cultures adhere to, and it is very hard for people, especially people in power to let this notion go. This is another way of controlling people. This is what is common to fundamentalism and democracy. The notion that our past was a golden one, and anything new will harm it and jeopardize the future of the culture. From what I feel is that there was no golden past, it just was.
And thinking about morality, though they say that there are some universal principles, everyone does not subscribe to same ones. In his theory Kohlberg, outlines these differences. But that said, he does not talk about obscenity, which I think it is highly cultural. For example a burqa clad woman is a common picture in certain Islamic communities, or a woman with ghunghat is all but common in certain Hindu communities, but at the same time some people might be find it too restrictive. And a woman in short skirt might be a common scene in the urban areas in certain countries, but it might be a great taboo for some others. There are no universal standards for what counts as moral or decent.

# Free Press and Democracy

A free press is an essential part of a democratic system. In a society like ours, with its stark inequalities, only a media free of government and corporate pressures can ensure that the voiceless are heard. What we are seeing currently is not just blatant collusion between the media and big business but also a deliberate obliteration of much of what happens to the millions who live on the margins.
via Economic and Political Weekly

This is what Media Lens has to say about the BBC which is supposed to be in public interest and impartial.

Instead of providing responsible, public-service journalism, the BBC acts as a conduit for government propaganda. It is particularly noxious that the organisation relentlessly channels the state’s supposedly benign intentions abroad. This is the diet of daily bias and distortion we are all fed. When will BBC heads roll for that?

But isn’t this true of the media in India also? Or elsewhere in the world for that matter. Tehelka reports that many of the barons of power also control the local media in newly formed state of Chattisgad. And what is the use of controlling media when they are not used for gains. When the so called free media becomes a part of the political parties we cannot be sure of what they report.

If the Congress has Naveen Jindal, the BJP has Ajay Sancheti. If the Congress has the Lokmat, the BJP has the Hari Bhoomi. Barring coal, in which both the Centre and the states had their hands in the till, in the case of other mineral resources, the real corruption lies in the states.

It is not that people do not use media for their own gain, media is used for spreading ideology, there are many mouthpiece outlets for political parties and others which propagate the ideas. But what is worst is that the masquerade that many media houses put on themselves claiming to be honest and working in public interest, and people at large believe them, being obliviousto the fact that these very media houses are the ones who are power brokers and very much in the filth as corporates and politicians. A recent example of this was the Radia tapes.

The complete blackout of the Niira Radia tapes by the entire broadcast media and most of the major English newspapers paints a truer picture of corruption in the country than the talk shows in the various news channels and the breast-beating in all the newspapers about the 2G, CWG, Adarsh, and other scams.
via|G. Sampath – DNA

It was not until the non-main-stream media began to show up too much, there was some coverage given. But the very fact that the accused are in complete denial of what happened is what is disturbing. We usually held names like Barkha Dutt, Vir Sanghvi well but these tapes just show how much they are in the filth of what they pretend to expose. From then on, I have given up on NDTV as a reliable source, which earlier I thought it was. But then what do you trust?

At the same time, it is worth noting that neither Barkha nor any of the other journalists whose names have come up have denied that those conversations took place. So why not let the reader or TV viewer read or listen to the transcripts and decide whether Dutt and Sanghvi’s conversations with Radia are a part of “normal journalistic duties” or amount to pimping for politicians and business houses? Or perhaps they were doing social service for the Congress? Play the tapes on your show, na, Ms Dutt, instead of tweeting about them? Why not let ‘We, The People’ decide, instead of you deciding for us all?
via|G. Sampath – DNA

The media blackout of particular events is what I find disturbing. What it shows the kind of camaraderie that exists between different media houses and their corporate and political cronies. That basically means that the news, sorry the Breaking News that you see is like a managed play, with directors and writers deciding what people see, hear and think. In Marathi novel (Ithink it was Swami (स्वामी) by Ranjit Desai) I had read a sentence which fits these situations well, it reads:

मी मारल्या सारखे करतो, तु रडल्या सारखे कर.
( I will feign to hit, you feign to cry.)

This creates an illusion about real problems. Most of the News channels that are beamed in India follow this line. Put all the focus on some non-issues, or twist them from certain angles so that why all this happens remains oblivious to the viewers. If our media was after all serious about the issues that they present, they would have seen to it that things are done.
Many a times what I have also found reading reports on various different news services is that they are same. I mean many a times they are word to word same, as if the reports have been written at one place and distributed. I do not have links right now, but will update this post when I do. This again creates a picture that what news we see is heavily filtered, and sometimes flavours are added to create sensationalism. And the icing is that we all think this is genuine, with “Free Press in A Democracy”. Orwell had a foresight about this as well:

Of course, print will continue to be used, and it is interesting to speculate what kinds of reading matter would survive in a rigidly totalitarian society. Newspapers will presumably continue until television technique reaches a higher level, but apart from newspapers it is doubtful even now whether the great mass of people in the industrialized countries feel the need for any kind of literature. They are unwilling, at any rate, to spend anywhere near as much on reading matter as they spend on several other recreations. Probably novels and stories will be completely superseded by film and radio productions. Or perhaps some kind of low grade sensational fiction will survive, produced by a sort of conveyor-belt process that reduces human initiative to the minimum.
via The Prevention of Literature | George Orwell

The only reason I see that India is feudal and corrupt is that the so called Free Press was never able to take up the challenge to the nexus, and ultimately now has become a part of it.

In our age, the idea of intellectual liberty is under attack from two directions. On the one side are its theoretical enemies, the apologists of totalitarianism, and on the other its immediate, practical enemies, monopoly and bureaucracy.
via The Prevention of Literature | George Orwell

Though there are dissidents here and there, this now has become global phenomena, with the Indian media people just following the suit. And if this is the case, what difference does it make whether you are living in a democracy or a totalitarian state?
And Orwell wraps it up thus:

A totalitarian society which succeeded in perpetuating itself would probably set up a schizophrenic system of thought, in which the laws of common sense held good in everyday life and in certain exact sciences, but could be disregarded by the politician, the historian, and the sociologist. Already there are countless people who would think it scandalous to falsify a scientific textbook, but would see nothing wrong in falsifying an historical fact. It is at the point where literature and politics cross that totalitarianism exerts its greatest pressure on the intellectual.
via The Prevention of Literature | George Orwell

# Freedom of Expression in India

About 10 years back the GoI decided that there were a lot of dissident voices from the North-East on Yahoo! Groups which were harmful to the health of the nation. The result was that there was a blanket ban on Yahoo! groups. Then people who were using Yahoo! Groups other than what GoI thought was harmful, suffered too. It was a classic case of complete misunderstanding about the nature of how the internet works. Of course then as now people had means to go over the blockade. That was 10 years back, net penetration was not that much, so we could forgive the bureaucracy over such things. Claiming disease called ignorance.
10 years have passed, one would have expected that the babus and their political masters would have learned (something) about how this new technology works and how it is fundamentally different than other mass media. If not the old babus, the somewhat younger generation which replaced them. (Oh, but I heard babus never retire they are kept on the job as part of this or that committee.) In a sense of deja vu, this time also the trouble was in the North-East. After the violence there, and its strange aftermath in Bombay (Middle-West) thousands of kilometers away and also in Bangalore (Down-South). Then began the blame games and it was discovered that the social networking sites were the culprit. So what is the quick fix solution? Ban all of them.

ना रहेगा बास ना बजेगी बांसुरी .

So this blog and my other blogs were not accessible through my humble Photon+ conncetion. It just refused to open these sites. I thought it was some problem with my connection. Only today I came to know the grim reality, that they had actually blocked WordPress, completely! Though other ISPs as of now have not, but it may not be long before they do that. This is akin to banning all printing presses as someone prints something objectionable to someone. And in a democracy, someone will get offended by whatever you say. But it might be just that the babus are also executing their freedom of speech, by giving orders to ISPs for blocking other people’s Freedom of Speech. Here we are in paradoxical situation.

Can Freedom of Speech of one person supersede the Freedom of Speech of other? But the constitution says that all people are equal, then how is this possible?

Orwell comes to our rescue then when says:

All are equal and some are more equal than others.

This cuts the knot for us, and we can perfectly make sense of the things that are happening around us.
Maybe someone needs to  put up a PIL in SC against such blanket bans in the future, to uphold the Right to Free Speech! And I sincerely hope that person who makes such a PIL is more equal than others.
And may be not all of you will be able to read this, as wordpress is blocked…

# Let us Respect The Flag, Respect The Nation?

Recently I got a forward email…

Dear Indian!
Greetings on Independence Day!!

The National Flag is a symbol of the Nation’s respect and pride. There is a liberal use of the flag on Independence Day and Republic day. There is a new trend of selling flags made up of paper and plastic, which is incorrect.

Do’s and Dont’s

• Hoist the Flag at a height in a suitable manner.
• Do not let small children use the National Flag as a toy.
• Do not use or buy plastic Flags.
• Do not use paper Flags to pin up on shirt pockets, etc.
• Take care to see that the Flag does not get crumpled.
• Do not use the Flag as a banner or for decoration.
• Take care to see that the National Flag is not trampled upon or torn.
• Do not let the Flag fall on the ground.
• Do not join cloth pieces to resemble the National Flag.

What do you say? Do you agree? Of course, most of us would. But why? Why does the respecting the National Flag mean respecting the nation? I do not agree completely though…

I will elaborate what I mean to say…

For most of us Indians, The Flag represents The nation. The Flag is an iconification of our national pride. We like to have icons for everything that we respect. That channels our feelings towards the thing respected. The Flag is just like the idolization of many things, you respect the idol, you respect the thing. National Flags project the identity of a nation, they represent and foster the national spirit. The unique designs and colours the flags embody, reflect a particular nation’s character and declare the nations’s separate existence. It is the identity of The Nation. Thus it is but natural that a national flag has a great amount of significance. The respect and dignity of the flag needs to be fostered and maintained, for which explicit rules have been laid down. The rules provide against the burning, mutilation and destruction of the flag. The above mail was a sort of Flag Hoisting for Dummies which contained do’s and dont’s derived from such rules. Respect for the National Flag would mean that the you are respecting the values for which the national flag stands for. The history and the various protocols related to our National Flag refer to the Wikipedia entry, very comprehensively written.

Our flag, therefore, is both a benediction and beckoning. It contains the blessings of all those great souls who brought us to freedom. But it also beckons us to fulfil their vision of a just and united India. As we confront crucial challenges to our security, our unity and integrity, we cannot but heed to the call of this flag to rededicate ourselves to the establishment of that peaceful and just order wherein all Indians irrespective of creed, caste or sex will fulfil themselves.
R. Venkataraman

“[The National Flag is] a flag of freedom not for ourselves, but a symbol of freedom to all people who may seek it.”
Jawahar Lal Nehru

“…while this is a symbol of our past, it inspires us for the future. This flag flies today as the flag of the nation, and it should be the duty and privilege of every Indian not only to cherish and live under it, but if necessary, to die for it.”
Frank Anthony

More than an object the National Flag is an emseble of ideas, which form our nation. National Flag indisputably stands for the whole nation, its ideals, aspirations, its hopes and achievements. It gives you the feeling that you are an Indian.

The importance of a National Flag does not depend on its colour, its bands or its other parts. The flag as a whole, is important and other things-the colours etc, that it contains- are immaterial. The flag may be of a piece of white cloth or of any other insignificant material but when it is accepted as a National Flag, it becomes the emblem of national self-respect. It becomes an expression of the sense of freedom of a nation.

Goving Malaviy

The points that are raised in the quotes above, all of us would surely agree. The Flag played an extremely vital role in India’s struggle for freedom and its adoption was one of the indications of the culmination of that struggle. But today, in the light of the present society, The Flag should be something much more than a mere symbol of freedom.

From time immemorial, people have laid down their lives for their flags. Indeed, there is something so compelling in this piece of cloth, called the National Flag, the people make even the supreme sacrifice for its sake. The National Flag stands for the whole nation, its ideals, aspirations, its hopes and achievements. It is a beacon showing to its people the path hen their very existence is threatened. It is at this time of danger that this much length of cloth inspires people to unite under its umbrella and urge them to defend the honour of their motherland.

Let me ask you another question. How many of you have your own National Flag? When I was a child I, people were allowed to hoist the flag only on certain special days, otherwise you could be jailed for hoisting your own National Flag in your own country. People were afraid in their own country to raise their own Flag. And the police are found to be extra alert for locating and taking action on any disrespect for The Flag. [If they could just show equal enthusiasm for implementing the other laws as well!] What kind of free country would not allow its own citizens to raise The Flag? If we were still under the occupation by the British, this would be understandable, but we were not…
It took maybe 50 years for people to realize this, and kudos to Naveen Jindal for fighting the case in Supreme Court on people’s behalf. The result of this PIL is is that now…

Right to fly the National Flag freely with respect and dignity is a fundamental right of a citizen within the meaning of Article 19(1)(a) of the Constitution of India being an expression and manifestation of his allegiance and feelings and sentiments of pride for the nation;

But even after this people are afraid, when I bought my Flag, people asked me, What will you do with it? I mean this is just plain ignorance, what do you do with a flag? Another few suggested that I could land in trouble [read jail] if The Flag was “disrespected.” And all of these call themselves patriotic…

But is it just that? Just respect The Flag according to the Flag code and you are done. Is there nothing beyond this? The point that I want to raise here is that respecting The Nation does not start at respecting The Flag nor does it end there. It goes much more beyond.

The Flag code is just a ritual, but the meaning of it goes much deeper than the rituals associated with it. From what I see The Flag code is just a hollow ritual, which prevents you from seeing things that lie beyond. If you really respect the nation, there are much better ways to do it, rather than giving too much respect to a piece of cloth so revered.

I ask you another question, of all the bureaucrats and the politicians who “officially” enjoy the privilege of The Flag, how many actually deserve it? Even with MPs who have dozens of cases pending against them, can boast having a flag. This I find the worst possible disrespect for The Flag. This offence is much more grave than one in which a person does not follow The Flag Code.

What I mean here is that see beyond The Flag Code, and try to understand what it implies in our actions. If you are following The Flag Code strictly but are corrupt or promote corruption, or do not follow the rules [lets say even trafic rules], not pay the taxes, etc. etc. You are dishonouring The Flag more than you could do by doing away with all the rules in The Flag Code.

Just a passing remark…
The Flag Code [3A vi] in particular mentions a punishable offence:

lettering of any kind shall not be put upon the Flag;

References:

Citation : 2004 SOL Case No. 069
SUPREME COURT OF INDIA
Before :- Brijesh Kumar and S.B. Sinha, JJ.
Civil Appeal No. 2920 of 1996. D/d. 23.1.2004
Union of India – Appellant
Versus
Naveen Jindal and Anr. – Respondents
[Available online here.]

The Flag Code of India
[Available online here.]

# The Problem of Raj

Now that the dust is settling over the issue of north indians’ in Mumbai, the central character in this issue Raj Thackrey has become known to more people that he was before.
The point I want to emphasize is that all of the media channels whether in print, electronic or otherwise have at most presented the half side of the story.

Most of them begin from the provocative statements’ made by Raj, without mentioning the background with which they were made in. I am in no way supporting anybody, but then presenting a dialog as a monologue is is cheating on the people. What happened was unfortunate, but the way media portrays it is so bad, that as if the entire law and order situation in Mumbai has go bad. But this was not the case I was out on all the days in which the incidents took place, apart from the areas mentioned life was as usual in the other areas.

But the replaying of a 1 minute film of 1 incident 100 times does not mean that 100 incidents happened. This is what most of the people don’t understand, when a video clip is shown repeatedly they this is happening continuously, just enhancing the worries and tensions. Is this what media wants? To take the public in a rage; if the incidents were reported in a proper manner the mania around them, and characterization of Raj as a monster would not have happened. Media is behaving as irresponsibly as it can in this case. And the kind of intellectualism’ that is being done is doing no good to the problem itself.

Let us take a look at the problem itself, which has caused this trouble. People from the undeveloped’ parts of India come to Mumbai and other metros in search for the livelihood. This is most clearly seen in case of Mumbai, which also happens to be the financial hub of the country. So it is natural’ for people to come here in large numbers. But why is this so? Since people in home states do not have enough employment opportunities they come here. So who is at fault here? Are the people in Mumbai at fault for the non-development of regions elsewhere? So my question is who is at fault?

Comments made by Raj has made a lot of people in lot of sections uncomfortable. Why is this so? His comments have exposed a lot things, about the other’ states. If people call these events as failure of constitution in Mumbai, then what about other states. Going along these lines it seems that the constitutional machinery has failed people of these regions time and again, by not being able to provide them with ample and decent oppurtunities for employment. Thus the very politicians who are slamming Raj left and right are the real problem makers. If they being in power for so long like Lalu Yadav and Mulayam Singh could not do anything about their own state [like they wanted to ] what moral right do they have to call the situation in Mumbai a constitutional failure?

People who know this are the ones who are most uncomfortable…


text:
# Russo-Dye theorem

Let $A$ be a unital $C^{*}$-algebra. Then the unit ball of $A$ is the closed convex hull of the unitaries in $A$. Moreover, these unitary elements are extreme points of the unit ball.

Title Russo-Dye theorem RussoDyeTheorem 2013-03-22 16:01:52 2013-03-22 16:01:52 aube (13953) aube (13953) 4 aube (13953) Theorem msc 47A60


text:
## anonymous 3 years ago Write the following value in standard notation. 4.25 x 10^6 425,000 4,250,000 425,610 425,000,000

1. anonymous

@jazy

2. anonymous

Is it 4.25 x 10^6

3. anonymous

@SWAG

4. anonymous

Yeah

5. anonymous

$4.25 \times 10^6=4250000$

6. anonymous

10^6 = 10 * 10 * 10 * 10 * 10 * 10 = 1,000,000 1,000,000 * 4.25 = 4,250,000

7. anonymous

So is it A or B?

8. anonymous

4,250,000

9. anonymous

SWAG