text:
# zbMATH — the first resource for mathematics

An example of nonlinear $$q$$-difference equation. (English) Zbl 1087.39023
Summary: We study the formal solutions of the nonlinear $$q$$-difference equation $x\sigma_qf-f=b(f,x)$ where $$\sigma_qf(x)= f(qx)$$, with a real number $$q>1$$ and $$b(f,x)$$ belongs to $$\mathbb{C}\{f,x\}$$ with the conditions $$b(0,0)=0$$ and $$(\partial_fb)(0,0)=0$$. We prove that a solution of this equation can be conjugated to the solution $$ue_q(x)=u q^{-\log_qx(\log_qx-1)/2}(\sigma_qu=u)$$ of the associated homogeneous equation, with the help of a formal substitution automorphism $$\Theta\in\mathbb{C}[[x,e_q,u,\partial_u]]$$.
Following the methods developed by J. Ecalle [Ann. Inst. Fourier 42, No. 1–2, 73–164 (1992; Zbl 0940.32013)], we first express this conjugating operator $$\Theta$$ as a mould-comould expansion. The mould $$W^\bullet$$ can be computed and each of its components is a formal series in $$x$$.
When $$b(0,x)=0$$, these components happen to be convergent and we prove that the conjugating operator is also convergent in a well-adapted topology.
In the generic case, the components of the mould are no more convergent. Nevertheless, these components are $$q$$-multisummable. This is not sufficient to define a good resummation process for the conjugating operator. Some unsolved problems call for new results in the $$q$$-resummation theory. Besides this, it also seems that the arborification of moulds yields some simplifications of the encountered problems.

##### MSC:
 39A13 Difference equations, scaling ($$q$$-differences) 40H05 Functional analytic methods in summability
Full Text:
##### References:
 [1] Ecalle ( J. ). - Singularités non abordables par la géométrie , Annales de l’Institut Fourier 42 , p. 73 - 164 ( 1992 ). Numdam | MR 1162558 | Zbl 0940.32013 · Zbl 0940.32013 [2] Zhang ( C. ). - Développements asymptotiques q-Gevrey et séries Gqsommables , Annales de l’institut Fourier 49 , p. 227 - 261 ( 1999 ). Numdam | MR 1688144 | Zbl 0974.39009 · Zbl 0974.39009 [3] Zhang ( C. ) , Marotte ( F. ). - Multisommabilité des séries entières solutions formelles d’une équation aux q-différences linéaire analytique , Annales de l’institut Fourier 50 , p. 1859 - 1890 ( 2000 ). Numdam | MR 1817385 | Zbl 1063.39001 · Zbl 1063.39001
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.


text:
# Global Transforms besides the DFT?

This is a simple question. Fourier analysis gives us the DFT, which is known as a global transform of a signal. In contrast, the Discrete Wavelet Transform (DWT) has a plethora of wavelets, all of which fall under the umbrella of local transforms.

I wonder, might there be other global transforms besides projection onto a family of orthogonal complex exponentials as with the DFT?

(I am aware of the DST and DCT, however I am looking for applicable non-sinusoidal bases).

Thanks!

-
The Hadamard transform is an example. It uses Walsh functions as its basis. –  Jason R Feb 4 '13 at 19:09
Thanks @JasonR I had forgotten about those. –  Mohammad Feb 4 '13 at 19:17
For the sake of opening up discussion on this, can you define what "global" and "local" mean in the context of a transform? –  user2718 Feb 5 '13 at 14:43
@BruceZenone Global in this context would mean a transformation that acts on the entire length of the signal. In other words, the entire signal is projected upon a set of bases functions. (DFT). In contrast, local transformations would be where only parts of the signal are projected upon basis functions. (DWT). –  Mohammad Feb 5 '13 at 15:05

format: plain


text:
0 like 0 dislike
A maple tree is 6 meters tall. Its shadow is 8 meters long. Close by, there is a streetlamp
that is 9 meters tall. How long is the streetlamp's shadow?
Write your answer as a whole number or a decimal. Do not round.
meters

0 like 0 dislike
12 meters

Step-by-step explanation:

The assumption regarding shadow lengths is that they are proportional to height at any given place and time.

__

Here, the streetlamp is 9/6 = 3/2 times as tall as the tree, so we expect its shadow to be 3/2 times the length of the tree's shadow.

(3/2)(8 m) = 12 m

The streetlamp's shadow is 12 meters long.
by


text:
# an algebraic group where the function field is not separable over the ground field

Suppose we have an algebraic group $G$ defined over a field $k$. Suppose we consider the fraction field of $k[G]$. Is it possible to get a situation where this field is not a separable extension of $k$? An example would be very helpful.

-

The answer depends on what you mean by "algebraic group". If you mean algebraic group in the sense of Borel/Humphreys/Springer, the field of fractions of $k[G]$ is always separably generated, more-or-less by definition. If you mean algebraic group scheme, which must be integral for the question to make sense, then it doesn't have to be separably generated, as shown by Tom's example.

-

Yes, this is possible. (Notice that your question implicitly requires $k[G]$ to be an integral domain, otherwise you cannot take its fraction field.)

Let $k$ be a non-perfect field of characteristic $p$, and let $a \in k \setminus k^p$. Consider the algebraic group defined as a functor from $k$-algebras to groups via $$G(R) = \{(r,r') \in R^2 \mid r^p = a{r'}^p \}$$ for all $R \in k\mathrm{-alg}$.

Then $k[G] \cong k[t,t']/(t^p-a{t'}^p)$, which is a domain whose fraction field $k(a^{1/p})(t)$ is visibly not separable over $k$.

-
I am curious: how is this a group? It looks like a $\mu_p$-torsor that is fppf-but-not-étale trivializable. –  S. Carnahan May 7 '14 at 8:17
@S.Carnahan: The mistakes in the original version of this answer have been fixed. –  user76758 May 7 '14 at 8:50
@user76758: Thanks for the correction! –  Tom De Medts May 7 '14 at 12:02
A thickened line of slope $a^{-1/p}$, very nice! –  S. Carnahan May 7 '14 at 12:31


text:
$$\Large \qquad \rho\frac{D\mathbf{u}}{Dt} = - \nabla p + \nabla \cdot \boldsymbol \tau + \rho\,\mathbf{g}, \qquad \varphi_X(t) = \exp \left\{ it\mu - \frac{1}{2} \sigma^2 t^2 \right\}, \qquad e^{A+B} = \lim_{N \rightarrow \infty} \left(e^{A/N}e^{B/N}\right)^N$$

# Upcoming webinars:¶

## Speaker: Cyprien Soulaine¶

### Micro-continuum modelling: A hybrid-scale approach for solving coupled processes in porous media¶

Effective use of the Earth subsurface for resources and energy applications requires very good control of time- and space-dependent fluid flow regimes. Such applications include the exploitation of groundwater reservoirs, the injection and sequestration of CO2 into deep saline aquifers, the storage of nuclear waste repositories, the development of geothermal energy, and the oil and gas recovery. Subsurface acidizing can lead to a reorganization of the pore-space through mineral dissolution and precipitation. These modifications of the rocks topology locally change the streamlines and, therefore, the hydraulic properties of rocks. The feedback between flow and geochemical reactions are complex and highly coupled. A good understanding of these non-linear phenomena is crucial to assess the long-term effectiveness and the environmental impact of such processes.

Pore-scale analysis of the involved physico-chemical processes is the elementary step in a modeling strategy in a cascade of scales nested in each other. Using devoted numerical modeling based on the micro-continuum approach and microfluidic experiments, we highlighted and characterized several regimes of dissolution instability at the scale of individual grains. We then demonstrated that the presence of a gas phase produced from the dissolution of a calcite crystal changes the stability diagrams. These results, upscaled to a continuum-scale formulation, inform the hydraulic and transport properties such as effective surface area, and shed new light on the differences observed between lab and field measurements.

## Speaker: Karel Devriendt¶

### Soules vectors: applications in graph theory and the inverse eigenvalue problem¶

George W. Soules introduced a set of vectors $r_1,\dots,r_N$ with the remarkable property that for any set of ordered numbers $\lambda_1\geq\dots\geq\lambda_N$, the matrix $\sum_n\lambda_nr_nr_n^T$ has nonnegative off-diagonal entries. Later, it was found that there exists a whole class of such vectors - Soules vectors - which are intimately connected to binary rooted trees. In this talk I will describe the construction of Soules vectors starting from a binary rooted tree, discuss some basic properties and their relevance to the symmetric nonnegative inverse eigenvalue problem. I will also cover a number an important applications to (spectral) graph theory: Soules vectors allow to realize any positive spectrum as the spectrum of a Laplacian matrix.

## Speaker: Derek Cook¶

### The Open Ball Topology¶

The open ball topology is a well known construction that induces a topology on a metric space. By saying a subset of a metric space is open if every point in it has a little ball around it we can turn any metric space into a topological space. But this leads to the question: can all topological spaces be obtained from metric spaces in this way? If not can we suitably extend the concept of a metric space sufficiently to do so? In finding some answers to these questions we will also examine whether or not the open ball topology is the only reasonable way to induce a topology on a metric space.

## Speaker: James Burridge¶

### Understanding human vowel systems as random walking words and flipping spins¶

Vowels are the primary carriers of information in human speech, and are therefore important sounds. Acoustically, they are resonances which depend on the shape of the mouth cavity, and may be reliably identified by the first two peaks of their frequency spectrum. We can think of them as points in an approximately triangular subset of $\mathbb{R}^2$, bounded by the constraints of the human vocal apparatus. The number and arrangement of vowel sounds within this triangle varies widely between languages, but there are some particularly common arrangements and repeating patterns. In this talk I will explore the general typology of vowel systems, derived from a database of 3020 languages and dialects, and present two different evolutionary models which attempt to explain them. In the first model, I will view the words of a language as a diffusing soup of Brownian particles, interacting via the vowel sounds they contain. Using a simple model of language learning I will derive inter-particle forces which cause the words to form globules, each representing a different vowel. In the second model, I will draw on ideas from Markov Chain Monte Carlo and Ising spin dynamics to construct a simple evolutionary dynamics, capable of matching the statistics of real sound inventories almost perfectly. I will then show how Lasso regularization may be used to generate a version of this model which is simple enough for humans to understand. I will explain how these models shed light on some long standing debates in linguistics as to the origin of observed vowel patterns.

The work presented in the talk was carried out in collaboration with Bert Vaux, a phonologist (studies the organization of sounds) at the Faculty of Modern and Medieval Languages and Linguistics, University of Cambridge.

## Speaker: David Greenhalgh¶

### Backward bifurcation, equilibrium and stability phenomena in a three-stage extended BRSV epidemic model¶

In this talk we consider the phenomenon of backward bifurcation in epidemic modelling illustrated by an extended model for Bovine Respiratory Syncytial Virus (BRSV) amongst cattle. In its simplest form, backward bifurcation in epidemic models usually implies the existence of two subcritical endemic equilibria for $R_0 <1$, where $R_0$ is the basic reproductive number, and a unique supercritical endemic equilibrium for $R_0>1$. In our three-stage extended model we find that more complex bifurcation diagrams are possible. The talk starts with a review of some of the previous work on backward bifurcation then describes our three-stage model. We give equilibrium and stability results, and also provide some biological motivation for the model being studied. It is shown that backward bifurcation can occur in the three-stage model for small $b$, where $b$ is the common per capita birth and death rate. We are able to classify the possible bifurcation diagrams. Some realistic numerical examples are discussed at the end of the talk, both for $b$ small and for larger values of $b$.

## Speaker: Yuliya Kyrychko¶

### Dynamics of systems with distributed delays¶

Many physical, biological and engineering processes can be represented mathematically by models of coupled systems with time delays. Time delays in such systems are often either hard to measure accurately, or they are changing over time, so it is more realistic to take time delays from a particular distribution rather than to assume them to be constant. In this talk, I will show how distributed time delays affect the stability of solutions in systems of coupled oscillators. Furthermore, I will present a system with distributed delays and Gaussian noise, and illustrate how to calculate the optimal path to escape from the basin of attraction of the stable steady state, as well as how the distribution of time delays influences the rate of escape away from the stable steady state. Throughout the talk, analytical calculations will be supported by numerical simulations to illustrate possible dynamical regimes and processes.

## Speaker: Jorge Bruno¶

### Locally finite trees and the topological minor relation.¶

Nash-Williams showed that the collection of locally finite trees under the topological minor relation results in a BQO. Naturally, two interesting questions arise:

1. What is the number $\lambda$ of topological types of locally finite trees?

2. What are the possible sizes of an equivalence class of locally finite trees?

For (1), clearly, $\omega_0 \leq \lambda \leq c$ and Matthiesen refined it to $\omega_1 \leq \lambda \leq c$. Thus, this question becomes non-trivial in the absence of the Continuum Hypothesis. In this paper we address both questions by showing - entirely within ZFC - that for a large collection of locally finite trees that includes those with countably many rays:

• $\lambda = \omega_1$, and

• the size of an equivalence class can only be either $1$ or $c$.

## Speaker: Hipolito Treffinger¶

### Keep calm and build your objects in order¶

In the sixties, when Mumford introduced in algebraic geometry the so-called geometric invariant theory, he showed that, under the right (stability) conditions, some times we do not have to prove something for all objects, but only for those that are stables. Some years later, Harder and Narasimhan showed that every vector bundle of an algebraic curve can be built using the stable objects following the order induced by the slope function. Nowadays, the stability conditions have been adapted to multitude of branches of mathematics and often one can find a theorem which is an adaptation of the result of Harder and Narasimhan to each particular environment.

In this talk we will recall the definition of a torsion pair and we will introduce the indexed chains of torsion classes. Our main theorem is that every indexed chain of torsion classes induce a Harder-Narasimhan filtration. The result for stability conditions becomes then a particular case of our theorem.

After that, we will follow ideas of Bridgeland to show the existence of a (pseudo)metric in the set of indexed chain of torsion classes. Implying that all indexed chains of torsion classes form a topological space.

No previous knowledge on abelian categories nor stability condition will be assumed.

## Speaker: Patricia Verrier¶

### Mathematical Modelling at Quintessa¶

Quintessa is an employee-owned scientific consultancy of 25 staff based in Henley-on-Thames and Warrington. We work in the areas of decision support, geosciences, materials modelling, risk assessment and software development, and mathematical modelling is an important part of our day-to-day work. With a focus on the right level of detail for the problem, the methods we use can range from high-level statistical analysis to system-level compartment-based models to detailed physics-based materials modelling. This talk aims to provide an overview of the role of mathematical modelling at Quintessa and how it supports our work.

## Speaker: Vincenzo Tamma¶

### The quantum information supremacy of linear optics quantum interference¶

Multiphoton quantum interference underpins fundamental tests of quantum mechanics and quantum technologies, including applications in quantum computing, quantum sensing and quantum communication. Standard quantum information processing schemes rely on the challenging need of generating a large number of identical photons. In this talk, we show how the difference in the photonic spectral properties, instead of being a drawback to overcome in experimental realisations, can be exploited as a remarkable quantum resource. Interestingly, we demonstrate how harnessing the full multiphoton quantum information stored in the photonic spectra by frequency and time resolved correlation measurements in linear interferometers enables the characterisation of multiphoton networks and states, produces a wide variety of multipartite entanglement, and scales-up experimental demonstrations of boson sampling quantum computational supremacy.  These results are therefore of profound interest for future applications of universal spectrally resolved linear optics across fundamental science and quantum technologies with photons with experimentally different spectral properties.

### References:¶

• [1] S. Laibacher and V. Tamma, Phys. Rev. A 98, 053829 (2018)
• [2] S. Laibacher and V. Tamma arXiv:1801.03832 (2018)
• [3] V. Tamma and S. Laibacher, Phys. Rev. Lett. 114, 243601 (2015)
• [4] S. Laibacher and V. Tamma, Phys. Rev. Lett. 115, 243605 (2015)
• [5] V. Tamma and S. Laibacher,  Quantum Inf. Process. 15(3), 1241-1262 (2015)

## Speaker: Marianna Cerasuolo¶

### Mathematical model of induced drug resistance in the TRAMP model of prostate cancer¶

Androgen deprivation therapy ability to reduce tumour growth represents a milestone in prostate cancer treatment, nonetheless most patients eventually become refractory and develop castration-resistance prostate cancer (CRPC). Enzalutamide is a second-generation drug recently approved for the treatment of CRPC. However, cases of tumour resistance to enzalutamide have now been reported. In this study the multistage model of TRAMP mice and TRAMP-derived cells have been used to extensively characterise in vitro and in vivo response and resistance to second-generation androgen receptor antagonist enzalutamide.

Within the study a multiscale mathematical model has been developed. The set of six stochastic differential equations describes the interaction between heterogeneous cancer cell populations, the pharmacokinetics of the administered drug and the dynamics of the tumour microenvironment. The integration of experimental data with a mathematical framework of tumour growth allowed to gain insights into the dynamics of intratumoral evolution. The response of prostate cancer to different therapy strategies was explored with in silico experiments. The model clearly shows that the use of enzalutamide does always cause the onset of resistance and that no strategy allows to successfully control the disease, which suggests that drug combination therapies are needed.

## Speaker: Michal Gnacik¶

### On PCA, fitting an elipse into data, and shapes of memorised random walks¶

In the first part of the talk, we discuss the principle component analysis (PCA, a procedure used for data dimensionality reduction) and describe a simple method of fitting an error elipse into data via the convariance matrix resulting from the data. In the second part of the talk we consider a random walk with sites obtained via evaluating two dimensional Brownian motion at the arrival times of a non-homogeneous Poisson process. We view this random walk as the memory (mental map) of a foraging animal, perhaps searching for food while forming a mental map of its surroundings. We will work with the corresponding covariance matrix (similarly as in the first part of the talk) and obtain a formula that measures how spherical this walk is on average with respect to the initial (or current) location of the walker; in particular, we show how this formula depends on the intensity function of a non-homogeneous Poisson process used to construct the walk. We give examples of intensity functions that lead to both spherical and aspherical shapes.

## Speaker: James Burridge¶

### Language Evolution in Spatial Domains, and Statistical Physics¶

Language is evolving everywhere, all the time. As a result, people from different parts of a language area may use their language in quite different ways. This geographical variation has often been visualized using “isoglosses”: lines marking the approximate geographical boundaries of different linguistic features. In this talk I will introduce a simple mathematical model in which domains of distinctive language use emerge spontaneously, with transition zones in between. I will show that domain boundaries (isoglosses) feel a form of surface tension and are also warped and moved by variations in population density, allowing us to predict the shapes of distinctive linguistic zones in different countries. Much of this simplicity arises from a connection between linguistics and physics: isoglosses behave much like domain walls between different atomic orderings in certain magnetic or crystalline materials, first studied by Ilya Lifshitz (a Russian Physicist) in 1962. I will then describe recent developments, in which continuous space is replaced with an embedded network, and more realistic processes describing language dynamics are investigated.

## Speaker: Jamie Foster¶

### Ion migration in perovskite solar cells¶

Metal halide perovskite has emerged as a highly promising photovoltaic material. Perovskite-based solar cells now exhibit power conversion efficiencies exceeding $22\%$; higher than that of market-leading multi-crystalline silicon, and comparable to the Shockley-Queisser limit of around $33\%$ (the maximum obtainable efficiency for a single junction solar cell). In addition to fast electronic phenomena, occurring on timescales of nanoseconds, they also exhibit much slower dynamics on the timescales of several seconds and up to a day. One well-documented example of this is the 'anomalous' hysteresis observed in current-voltage scans where the applied voltage is varied whilst the output current is measured. There is now a consensus that this is caused by the motion of ions in the perovskite material affecting the internal electric field and in turn the electronic transport.

We will discuss the formulation of a drift-diffusion model for the coupled electronic and ionic transport in a perovskite solar cell as well as its systematic simplification via the method of matched asymptotic expansions. We will use the resulting reduced model to give a cogent explanation for some experimental observations including, (i) the apparent disappearance of current-voltage hysteresis for certain device architectures, and (ii) the slow fading of performance under illumination during the day and subsequent recovery in the dark overnight. Finally, we suggest ways in which materials and geometry can be chosen to reduce charge carrier recombination and improve device performance.

## Speaker: Ittay Weiss¶

### An invitation to category theory¶

Category Theory was created by Eilenberg and Mac Lane more than 50 years ago. In this relatively short period of time Category Theory had transformed several areas of mathematics, primarily Algebraic Topology, and, perhaps unexpectedly, infiltrated nearly all areas of mathematics and even extending to physics, computer science, linguistics, and biology. Recent developments are strongly indicating that Category Theory reached a level of maturity allowing a line of applications attacking problems at the forefront of scientific and industry-fuelled inquiry. In particular, the new journal "Compositionality", the book "Seven Sketches in Compositionality: An Invitation to Applied Category Theory" by Spivak and Fong, and the book "What is Applied Category Theory?" by Bradley are some of the indications of the expected utility in the subject.

In this introductory talk I will offer an invitation to category theory assuming no prior knowledge of categories. Employing the perfect vision of hindsight I will offer a new perspective on the notion of injective, surjective, and bijective functions which will naturally lead to basic concepts of category theory and illustrate the power inherent in a categorical perspective. The lecture is accessible to second year undergraduate students. Anybody interested in accepting the invitation may be interested to attend a series of lectures I will give on Friday afternoons which will do more than just scratch the surface.


text:
# Prove without induction: Eigenvectors with distinct eigenvalues are linearly independent

Prove that if $$\{b_n\}$$ are eigenvectors with distinct eigenvalues $$\{\lambda_n\}$$, then $$\{b_n\}$$ are linearly independent.

Note: Proofs for this are available on this site and elsewhere. My question is to verify my proof below, which, at least to me, is simpler.

Lemma: If $$B$$ is a finite set of linear independent vectors, there is at most one linear combination of $$B$$ equal to a given vector $$v$$.

Proof: Consider a finite set $$\{b_n\}$$ of linearly independent vectors. Assume $$\sum_n c_nb_n = v$$ and $$\sum_n c'_nb_n = v$$, with at least one $$c_n \neq c'_n$$. Then $$\sum_n (c_n - c'_n)b_n = v - v = 0$$, which is impossible since $$\{b_n\}$$ is linearly independent.

Main Proof: Let $$\{b_n\}$$ be linearly independent eigenvectors of matrix $$A$$ with distinct eigenvalues $$\{\lambda_n\}$$. Let $$d$$ be a distinct eigenvector of $$A$$ with eigenvalue $$\delta \notin \{\lambda_n\}$$. We claim that $$d$$ is linearly independent of $$\{b_n\}$$.

Assume $$d$$ is not linearly independent of $$\{b_n\}$$. Then there exists $$\{c_n\}$$ such that $$\sum_n c_nb_n = d$$. Consequently, $$Ad = \sum_n \lambda_n c_n b_n$$. But $$Ad = \delta d = \sum_n \delta c_n b_n$$. This would give two different linear combinations of $$\{b_n\}$$ that yield $$Ad$$, violating the lemma. Hence, $$d$$ must be linearly independent of $$\{b_n\}$$.

Questions: Is this proof correct, rigorous, and well written? How can it be improved?

As far as I can tell, this proof does not use induction. Is that correct?

## Update

Thank you the responders. I believe I need to add the following step, which indeed uses induction. Can you please verify that with this step, the proof is correct?

Let $$B_0$$ be the empty set, and for all $$n \in \mathbb N$$, let $$B_n = B_{n-1} \cup \{b_n\}$$. If $$B_n$$ is a set (possibly empty) of linearly independent eigenvectors with distinct eigenvalues, $$B_{n+1}$$ must also be, as proven above. $$B_0$$ is such a set, and so therefore $$B_n$$ is such for all $$n$$. This completes the proof.

• Are you sure this isn't a proof without induction? That sure looks like an inductive step. Mar 17 at 19:37
• @eyeballfrog - Yes, I'd say they had done the inductive step, and left out the base case, and the words "the proof is by induction". I also think that the subtle distinction between "one vector is lin indep from a set of vectors" and "a lin indep set of vectors" makes it harder to see in this case. Mar 17 at 20:05
• Thanks! Can you please review the fix. Mar 17 at 20:12
• You are missing at least one step: from $\sum \lambda_n c_nb_n = \sum \delta c_nb_n$, you should conclude that $\lambda_n c_n=\delta c_n$ for all $n$. From the fact that $d$ is an eigenvector, and therefore not equal to zero, you know that at least on $c_i$ is nonzero. Then $\lambda_i c_i = \delta c_i$, and now you can cancel the $c_i$ to conclude that $\lambda_i=\delta$, contradicting the assumption that $\delta$ was distinct from all $\lambda_i$. Mar 17 at 20:31
• There is a theorem (proven by induction) that says that if $b_1,\ldots,b_n$ is a list of vectors, then it is linearly dependent if and only if there exists a $j$, $1\leq j\leq n$, such that $b_1,\ldots,b_{j-1}$ is linearly independent, and $b_j\in\mathrm{span}(b_1,\ldots,b_{j-1})$ You can then start with a list $b_1,\ldots,b_n$ of eigenvectors of pairwise distinct eigenvalues; if they are linearly independent, you are done. If not, then $n\gt 1$, and there pick $b_j$ as above and do your argument (with the added step). But this uses induction hidden in the minimality of $j$. Mar 17 at 20:34


text:
×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Designing for Wind Tunnel Test Section Velocity

## Designing for Wind Tunnel Test Section Velocity

(OP)
Please copy and paste my post if that assists responding.

I am trying to work backwards by selecting a target test chamber velocity to design a wind tunnel around. I want to revamp our current system as minimally as possible which means using the same fan and the current settling chamber and laminizer. The entrance and some of the test chamber section can be seen in this thread.

I understand all the area and pressure relationship stuff just fine. To me, deciding on the test section velocity by using the settling chamber and Bernoulli Principle equations seems partially erroneous since the laminizer is in there in the real world and affects free flowing air movement. The current setup has no entrance diffuser/section currently....this isn’t my design and I know it’s coefficients are wrong and its aerodynamics are questionable…

Regardless, this wind tunnel is used for heat exchanger studies, so that's why I'm looking to achieve a target velocity. 100 percent of the air is to be moved through the core for heat exchanger studies, and for that reason our test chamber now has the opportunity to be resized since it was designed incorrectly for the intended purpose.

Since this no doubt will require some fabrication work, I want to make sure the speed increase is viable (+10 MPH, currently 35 MPH). I'm probably just going to flow sim this in Solidworks, but I was also thinking I could just use the known test chamber speeds from our first tests to Bernoulli it out using the dimensions of the new, smaller cross section, higher speed test chamber. This method should be good for an estimate because it does not require my transition angles, correct? Do y’all know any other hacks like that?

Since I know Q (volumetric flow) of the fan and current dimensions of the test section and settling chambers transition, I’ve also got a sure fire way to roughly figure it out using advertised specs. But why on Earth is nobody teaching stuff this way? Why have the useless conceptual equations never been evolved and presented better for designing a wind tunnel??

### RE: Designing for Wind Tunnel Test Section Velocity

actually I don't think you're "working backwards". To achieve your increased air flow in the test section, using the same fan, you'll need to reduce the size of the test section. (in my mind working backwards would mean I've set the test section parameters (size, airflow) and will select a fan to achieve these).

This will change almost the entire tunnel.

There are texts and such "out there" but wind tunnels is such a small field that they may be hard to find. I'd seek out a nearby wind tunnel (like at a university or college) and talk to someone there. A key (the key ?) to tunnel design is the uniformity of the airflow across the test section.

### RE: Designing for Wind Tunnel Test Section Velocity

Most wind tunnels aren't operated with the amount of obstruction you are looking to test with, limiting design info further.

For certain, flow out of a centrifugal blower isn't uniform, which is why I would have expected the blower to be on the down-wind side as a suction system so the inlet can have a simple grid straightener. It also avoids pre-heating the air from the work done by the blower which means the inlet temp will also be uniform, making temperature measurement easier.

### RE: Designing for Wind Tunnel Test Section Velocity

(OP)
Rb1957 I suppose I meant backwards from the methods I was loosely referencing from my undergrad lab material as they wanted us to make a wind tunnel by sizing the test section vs settling chamber first. Figures the school way is the sillier way since these loons never got into the real world…plus it would have merits for a different intent.

I know UCF has at least two wind tunnels as I saw them a few times while in undergrad and got to use them too. I’d love to make some senior students do this study for me haha. At the same time, I’ve been pretty successful with convincing my boss to revamp the erroneous, so now we have some cash sunk into this thing and it’s like a weird elephant in the room. Most people just really don’t understand how !@#$ing crazy and expensive testing is: This system still needs another$1K-$2K to become close enough to the Kays & London setup, and we’re not a heat exchanger company lol. I’m having such an ethics struggle with trying move forward knowing that the measurements won’t be valid, nor the method correct for understanding heat exchanger performance. I’ve actually found and contacted a company that received a$10K grant for a wind tunnel to rate their heat exchangers, but it was gonna be hard to get them to test ours it seemed.

(OP)
3DDave I have this as a constant thought in my brain as well, perhaps Kays and London were just using it as the most analogous term for their wind box setup for their heat exchanger trials haha? Regardless, the one company I mentioned above with the $10K wind tunnel is following the Kays and London method that 100 percent of air must move through the core. My boss just bought the fan reactively to replace another home fan for this other hysterical method that was devised before I got to the company; it’s hard out here for an engineer sometimes. I would’ve set up the tunnel as a down draft as well, and I would’ve optioned a bladed fan driven by pulleys so the speeds can be changed. ### RE: Designing for Wind Tunnel Test Section Velocity your mgmt are bitching over another$2k ?? good grief, they'll spend more discussing what flavour of coffee to have in the break room (the exec break room, that is) !

I don't think you can work with a bad wind tunnel (or any other apparatus) without at least saying here's the results, and here's the error bands ! I think you need to work up some tests to show how poorly it works.

### RE: Designing for Wind Tunnel Test Section Velocity

(OP)
rb1957 most people just really aren't ready for a scientific measuring trial as they're both very accomplishing and very annoying to carry out. Right now the system was set up with a YouTube science video level of planning, aka just for fun lol. You'll see on some of my other posts that I'm encountering heavy ideologue resistance in general here, despite me being the only one who has the education to understand it at face and deeper levels. The fact that I have to even get on here to spend time away from just fixing it is the funny part, but it is the company money at the same time...

Once I get a few flow sim images (pending my 10 year old personal laptop can handle it on a scale model) I think it should be easier to see how poorly air flows. We don't have flow sim in Inventor, and there's also no way that would be paid for either. In the end, even with convincing results, I still won't be able to do anything about it most likely :(

### RE: Designing for Wind Tunnel Test Section Velocity

Apologies up front if I missed something in the other replies...

You can certainly use Bernoulli and other similar simplifications(VA_1 = VA_2) for a low speed setup like that. If you're going that route, you could also calculate for a top end around 60mph, and your losses will put you in the ballpark or just over. Just keep in mind that before your rework, with a known Q your speed is what it is in low speed tunnels.

One of the best references for low speed tunnel design and methodologies is "Low Speed Wind Tunnel Testing" by Jewel Barlow. Basically the industry standard.

### RE: Designing for Wind Tunnel Test Section Velocity

Pushing air at higher velocities means you need to get to higher differential pressures, which means more fan horsepower and more CFM simultaneously. You are probably fan-limited not section limited right now. The idea of a pulley-driven fan is not bad, as you could always find a bigger motor. But, worst case, you might get there by adding more cheap leafblowers too...

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!


text:
GMAT Question of the Day: Daily via email | Daily via Instagram New to GMAT Club? Watch this Video

 It is currently 03 Jun 2020, 06:45

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# If p is a positive integer, what is the remainder when p^2 – 1

Author Message
TAGS:

### Hide Tags

GMATWhiz Representative
Joined: 07 May 2019
Posts: 719
Location: India
If p is a positive integer, what is the remainder when p^2 – 1  [#permalink]

### Show Tags

Updated on: 07 Apr 2020, 23:11
1
1
00:00

Difficulty:

85% (hard)

Question Stats:

39% (01:40) correct 61% (02:17) wrong based on 61 sessions

### HideShow timer Statistics

If p is a positive integer, what is the remainder when $$p^2 – 1$$ is divided by 8?

(1) p is completely divisible by 3
(2) p leaves a remainder when divided by 2.

GMATWhiz Quant Prepathon Lesson 1 Question 2

Share your answers with explanations to participate in the Prepathon and win exciting prizes! Access the 1st lesson of the Prepathon using this link.

If you want to access the other posts of the Prepathon and participate in it, bookmark the Megathread of the Prepathon. Stay tuned and Enjoy learning!

_________________

GMAT Prep truly Personalized using Technology

Prepare from an application driven course that serves real-time improvement modules along with a well-defined adaptive study plan. Start a free trial to experience it yourself and get access to 25 videos and 300 GMAT styled questions.

Score Improvement Strategy: How to score Q50+ on GMAT | 5 steps to Improve your Verbal score
Study Plan Articles: 3 mistakes to avoid while preparing | How to create a study plan? | The Right Order of Learning | Importance of Error Log
Helpful Quant Strategies: Filling Spaces Method | Avoid Double Counting in P&C | The Art of Not Assuming anything in DS | Number Line Method
Key Verbal Techniques: Plan-Goal Framework in CR | Quantifiers the tiny Game-changers | Countable vs Uncountable Nouns | Tackling Confusing Words in Main Point

Originally posted by GMATWhizTeam on 05 Apr 2020, 08:39.
Last edited by GMATWhizTeam on 07 Apr 2020, 23:11, edited 1 time in total.
Manager
Joined: 27 Dec 2012
Posts: 127
Re: If p is a positive integer, what is the remainder when p^2 – 1  [#permalink]

### Show Tags

05 Apr 2020, 08:59
2
p= pos int
(p^2-1)/8 ; remainder=?
(p-1)(p+1)/8
If p= odd, p-1 and p+1 both are even
And since p-1,p,p+1 are consecutive integers, one of p-1 and p+1 must be divisible by 2 and the other must be divisible by 4.
Keeping this is mind lets move to the statements
Statement 1: p is divisible by 3
If p=3, (p-1)(p+1)=8
So remainder=0
But if p=6,(p-1)(p+1)=35
Remainder=3
Insufficient
Statement 2: p is odd
Aa discussed above if p is odd, (p-1)(p+1) will always be divisible by 8
Sufficient
B

Posted from my mobile device
Senior Manager
Joined: 14 Oct 2019
Posts: 406
Location: India
GPA: 4
WE: Engineering (Energy and Utilities)
Re: If p is a positive integer, what is the remainder when p^2 – 1  [#permalink]

### Show Tags

05 Apr 2020, 09:43
1
If p is a positive integer, what is the remainder when p^2–1 is divided by 8?

(1) p is completely divisible by 3
if p=3, remainder is 0 BUT if p= 6, remainder is 3 . insufficient
(2) p leaves a remainder when divided by 2.
so, p = 2k+1 (k ≥0)
now, (p^2–1)/8 =((2k+1)^2-1 )/8 = (4k^2+4K) /8 = 4k(k+1)/8
k(k+1) always divisible by 2 since for any value of k one of these two , one must be divisible by 2
so, 4k(k+1) is divisible by 8 .
so, remainder = 0 . sufficient

Director
Joined: 14 Dec 2019
Posts: 666
Location: Poland
GMAT 1: 570 Q41 V27
WE: Engineering (Consumer Electronics)
Re: If p is a positive integer, what is the remainder when p^2 – 1  [#permalink]

### Show Tags

05 Apr 2020, 16:23
1
If p is a positive integer, what is the remainder when $$p^2 – 1$$ is divided by 8?

(1) p is completely divisible by 3
(2) p leaves a remainder when divided by 2.

Question stem analysis :-

is (p+1)(p-1) is divisible by 8?

if p = odd => (Odd+1)(Odd-1) = Even*Even = Even

Minimum value of p as odd = 1 => (p+1)(p-1) = 0 => divisible by 8
Next values of p as odd = 3 => (3+1)(3-1) = 4*2 => divisible by 8

if p = even => (Even+1)(Even-1) = Odd*Odd = Odd => Never divisible by 8

Question :- is p odd or even?

i) p = 3m => p = 3 => $$(p^2-1)$$ divisible by 8; p=12 => $$(p^2-1)$$ - Not divisible by 8 - Insufficient

ii) p leaves a remainder when divided by 2 => Remainder = 1 (As remainder can be only 0 or 1) => p is odd - Sufficient per the question stem analysis

GMATWhiz Representative
Joined: 07 May 2019
Posts: 719
Location: India
Re: If p is a positive integer, what is the remainder when p^2 – 1  [#permalink]

### Show Tags

05 Apr 2020, 21:26
1
I am happy to see that all of you marked the answer correctly. Good job!

I hope you were able to internalize the first skill that we discussed in the Prepathon. Here's the detailed solution to the first question. Even if you got the question right make sure that you check out the method in the solution to ensure that you have solved it using the right method. All the best!

Feel free to post any doubts that you may have in the forum below. We will be happy to help you with your queries
_________________

GMAT Prep truly Personalized using Technology

Prepare from an application driven course that serves real-time improvement modules along with a well-defined adaptive study plan. Start a free trial to experience it yourself and get access to 25 videos and 300 GMAT styled questions.

Score Improvement Strategy: How to score Q50+ on GMAT | 5 steps to Improve your Verbal score
Study Plan Articles: 3 mistakes to avoid while preparing | How to create a study plan? | The Right Order of Learning | Importance of Error Log
Helpful Quant Strategies: Filling Spaces Method | Avoid Double Counting in P&C | The Art of Not Assuming anything in DS | Number Line Method
Key Verbal Techniques: Plan-Goal Framework in CR | Quantifiers the tiny Game-changers | Countable vs Uncountable Nouns | Tackling Confusing Words in Main Point
GMATWhiz Representative
Joined: 07 May 2019
Posts: 719
Location: India
Re: If p is a positive integer, what is the remainder when p^2 – 1  [#permalink]

### Show Tags

06 Apr 2020, 06:15
1
Hi sauravleo123, preetamsaha, shameekv1989 - You have marked the correct answers. Great job! We have also awarded you some points for the explanations that you provided in the comments. You can view your points on the Leaderboard section of the Megathread of the Prepathon.

You stand a good chance of winning prizes worth up to \$250 by participating in the Prepathon. Let us know if you would like to be tagged in the posts related to the Prepathon, we will be happy to tag you in these posts
Senior Manager
Joined: 14 Oct 2019
Posts: 406
Location: India
GPA: 4
WE: Engineering (Energy and Utilities)
Re: If p is a positive integer, what is the remainder when p^2 – 1  [#permalink]

### Show Tags

06 Apr 2020, 06:22
GMATWhizTeam thanks for tagging me. btw the page is not opening.
GMATWhiz Representative
Joined: 07 May 2019
Posts: 719
Location: India
Re: If p is a positive integer, what is the remainder when p^2 – 1  [#permalink]

### Show Tags

06 Apr 2020, 06:26
preetamsaha wrote:
GMATWhizTeam thanks for tagging me. btw the page is not opening.

preetamsaha It's our pleasure. We will tag you in the other posts of the Prepathon. The link seems to be working for me. Try using this one. If this one also doesn't work you can find the Megathread of the Prepathon on the "GMAT Quantitative" main forum itself. Hope it helps
Manager
Joined: 21 Aug 2019
Posts: 132
Re: If p is a positive integer, what is the remainder when p^2 – 1  [#permalink]

### Show Tags

09 Apr 2020, 02:05
GMATWhizTeam wrote:
I am happy to see that all of you marked the answer correctly. Good job!

I hope you were able to internalize the first skill that we discussed in the Prepathon. Here's the detailed solution to the first question. Even if you got the question right make sure that you check out the method in the solution to ensure that you have solved it using the right method. All the best!

Feel free to post any doubts that you may have in the forum below. We will be happy to help you with your queries

Excellent video. Thanks a lot for your help
_________________
I don't believe in giving up!
Re: If p is a positive integer, what is the remainder when p^2 – 1   [#permalink] 09 Apr 2020, 02:05


text:
# Solve the equation by factoring. 1. 2 14x +3x-2 = 0 CE Toond anbst 6yode The solution set is (Use a comma to separate answers as needed. Type each solution only once.) Use factoring to solve the quadratic equation. Check by substitution or by using a graphing utility and identifying x-intercepts. 2. 2 4x=7x + 2 The solution set is (Use commas to separate answers as needed. Type each solution only once.) 3. Solve the equation by the square root property. E6 (x-9) 49 FAENER What is the solution set? (Use a comma to separate answers as needed.) Solve the quadratic equation using the square root property. 4. sa 2 (x+ 4)81 euatinenpneu The solution set is (Simplify your answer. Use a comma to separate answers as needed. Type an exact answer, using radicals Express complex numbers in terms of i.) Determine the constant that should be added to the binomial so that it becomes a perfect square trinomial. 5. factor the trinomial. 2 X +18x What is the constant that should be added to the binomial so that it becomes a perfect square trinomial? Write the trinomial. boan 2840r3 2h0pd (Do not factor.) Factor the result. (Simplify your answer.)

Question

Can someone help me solve this problem? Number two


text:
0

# What is the integral of the sine of x divided by the cosine squared of x with respect to x?

Mrkbh

Lvl 1
2010-11-05 06:54:41

âˆ« sin(x)/cos2(x) dx = sec(x) + C

C is the constant of integration.

Wiki User

2010-11-05 04:14:26
Study guides

20 cards

➡
See all cards
3.74
1200 Reviews


text:
# Option to break urls with carriage-return symbol?

There are several ways to get long, uncooperative URLs to line-break in LaTeX. If you're using pdfLaTeX, then the hyperref package can break them across lines for you, roughly after any /. If you give it the [hyphens] option, it will also allow line breaks after any - characters. If you're not using pdfLaTeX, the breakurl package gives the same behavior. But the documentation for it says that it will never break URLs at dashes, because the dashes could be mistaken for hyphens that aren't part of the URL. Similarly the documentation for the hyphens option of hyperref warns that breaking after hyphens may lead to typographic confusion. Specifically, if LaTeX had to process a url like http://foo.com/is-this-read-able-or-readable, and happened to break after the third dash, then viewing the printed result:

   http://foo.com/is-this-read-

is ambiguous: unless you as a reader already know that breakurl or [hyphens]{hyperref} never introduce new - characters, it is possible to read that url as is-this-readable-or-readable, which is incorrect.

So let's say you follow the warnings, and decide not to break after dashes. Then, naturally, you may find yourself with badly under- or over-full boxes. The recommended advice, that I normally follow, is to use FlushLeft, but even then you may have links that are particularly nasty to break into lines. So my scenario is:

• Even FLushLeft thinks the line is underfull
• There aren't any good characters to break the URL, after the last /
• In the online case (i.e. viewing on a computer, not in printout), I need to support hyperref linking the URL properly -- so weird characters shouldn't show up in the text or hyperref could get confused.
• I'm using pdflatex, if that impacts the solution at all.

My question (which I hope isn't duplicated by the many related questions on this site!) is, is there a way to configure \url so that I can break at any character, insert a carriage-return symbol (something visually similar to \hookleftarrow, I think) as the hyphen, and still get hyperref to link properly (i.e., not think the carriage-return is part of the text)? According to this question, it's tricky, and it doesn't look like it'll play nicely with hyperref. And other suggestions on other questions mostly boil down to "use ragged-right text". Obviously, I'd rather break at a breakable point in the URL rather than resort to inserting symbols, but this URL is particularly uncooperative...

Edited: I revised the description of the problem to (hopefully) clarify what I'm aiming for. I'm aware of solutions involving breaking at dashes; I'm trying to avoid any confusion about dashes versus hyphens in the first place :)

-
Are you compiling with LaTex or pfdLaTeX? pfdLaTeX is not suported by breakurl? Also, are you including breakurl after hyperref? It would be helpful to post a MWE. –  Peter Grill Sep 18 '11 at 20:44
@PeterGrill, this was more of a thought experiment, I guess. I mostly use pdflatex, so yes, breakurl is ireelevant; I included to link to it as "related work". The point about hyphens still stands; for a long, dashed section, breaking at hyphens is ambiguous, unless and until you realize that it only breaks at existing dashes... –  Ben Lerner Sep 19 '11 at 13:09

Do you need to use breakurl? If not, \usepackage[hyphens]{url} mostly works (the box around the hypenated URL is not quite right).

\documentclass{article}
\usepackage[hyphens]{url}
\usepackage{hyperref}

\begin{document}
\url{http://tex.stackexchange.com/questions/28835/option-to-break-urls-with-carriage-return-symbol}

\bigskip% An alternative, if this is meant for online use:
\href{http://tex.stackexchange.com/questions/28835/option-to-break-urls-with-carriage-return-symbol}{Question about to break in URLs}
\end{document}

The [hyphens] option also seems to solve the problem with the bibliography (adapted form Url references in bibliography):

\documentclass{article}
\usepackage[hyphens]{url}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Lerner, Ben},
year = {2011},
title = {Break URLs},
url = {http://short.domain.com/very-long-dashed-section},
}
\end{filecontents}

\begin{document}
\nocite{*}
\bibliographystyle{alphaurl}
\bibliography{\jobname}
\end{document}

UPDATE: 2011-09-20:

Borrowing from Replace hyphenation character by a backwards arrow, this uses a \hookleftarrow to be hyphen separator and seems to work. Here I have allowed every character to be breakable, but if that is not desired, you could selectively insert the \BreakableChar only at the characters you want to be breakable:

\documentclass{article}
\usepackage{hyphenat}
\usepackage{url}
\usepackage{xstring}
\usepackage{forloop}
\usepackage{xcolor}
%\usepackage{filecontents}

\newsavebox\MyArrowBox%
\sbox\MyArrowBox{$\hookleftarrow$}%
\makeatletter%
\newcommand*{\BreakableChar}{%
\leavevmode%
\prw@zbreak%
\discretionary{\usebox\MyArrowBox}{}{}%
\prw@zbreak%
}%

\newcounter{index}%
\StrLen{#1 }[\stringLength]%
\forloop[1]{index}{1}{\value{index}<\stringLength}{%
\StrChar{#1}{\value{index}}[\currentLetter]%
{\currentLetter\BreakableChar}%
}%
}%

\newcommand*{\MyUrl}{http://tex.stackexchange.com/questions/28835/option-to-break-urls-with-carriage-return-symbol}%

\begin{document}

\bigskip
\end{document}

-
I'm aware of the [hyphens] option for hyperref, but that option can be misconstrued when reading the link text as hyphenating a word: breaking after the third dash in "is-this-link-read-able-to-break" is ambiguous between "read-able" and "readable". I'm asking more for a solution that involves a character that is visibly not part of the url, to avoid the hyphenation ambiguity entirely. –  Ben Lerner Sep 19 '11 at 13:15
I have been unable to get this to produce "read-able". ie, it does not seem to add any extra hyphens. –  Peter Grill Sep 19 '11 at 18:26
Correct, the [hyphens] option won't introduce any new hyphens, but rather allow LaTeX to break after any existing ones. My point, which I guess I'm not articulating well, is that when reading a printout of this link (i.e., not the online case where you can click on the link), the reader can be confused whether the dash is part of the url or not, unless it's known that the typesetter (hyperref, in this case) would not introduce new dashes. My goal is to avoid the issue entirely, and use some other (invalid for URLs) character to indicate the line break. I'll clarify the original question. –  Ben Lerner Sep 19 '11 at 21:12
thanks! One quibble/irony -- though you've made the text blue, and indeed can break at any character (which is what I was after), you've eliminated calls to \url, which is the remaining part of the question. I've tried using \renewcommand{\url}[1]{\href{#1}{\texttt{\AddBreakableChars{#1}}}}, and it works in your MWE but not in my actual document (errors about missing numbers for \unhboxes and missing \$ inserted...) What does \prw@zbreak do in your code, so I can try to figure out how it works? –  Ben Lerner Sep 20 '11 at 14:19
ok, figured out why I'm getting errors. Your code above is over-zealous in inserting breaks: if a url contains \_ or \~ or any other macro, then the inserted break after the  will cause errors. So the forloop needs to grab things one token at a time, rather than one character... –  Ben Lerner Sep 20 '11 at 15:01

The url and by extension, the hyperref package let you define break points in urls by specifying \UrlBreaks, \UrlBigBreaks and \UrlNoBreaks. The hyphens option does nothing else than adding the hyphen do the \UrlBigBreaks list. But there is another tuning point: the \UrlSpecials. Here you con define characters that shall do funny things. So we can make the breaking characters insert the carriage return symbol when line breaking occurs at them. Note that url's are actually set in math mode, so the breaking characters have to be defined as to map to math characters, and the breaking point.

There is one little drawback to this solution. In the original setup, with / being a \UrlBreak character, no line break can happen between two consecutive slashes, as in http://... When making the slash special, such a break can happen.

\documentclass[10pt,a4paper]{article}

\PassOptionsToPackage{hyphens}{url}
\usepackage{dingbat} % for \carriagereturn
\newcommand{\urllb}{\discretionary{\carriagereturn}{}{}}

%% original breaking points of url package
% \def\UrlBreaks{\do\.\do\@\do\\\do\/\do\!\do\_\do\|\do\;\do\>\do\]%
%  \do\)\do\,\do\?\do\'\do+\do\=\do\#}%
% \def\UrlBigBreaks{\do\:\do@url@hyp}%

\renewcommand{\UrlSpecials}{\do\.{\mathchar\.\urllb}%
\do\/{\mathchar\/\urllb}%
\do\@{\mathchar\@\urllb}%
\do\\{\mathchar\\\urllb}%
\do\-{\mathchar\-\urllb}%
\do\#{\mathchar\#\urllb}}%
% and so on; I'm too lazy to type all breaking characters
% here, you get the idea
\begin{document}
\urldef{\myurl}\url{http://tex.stackexchange.com/questions/28835/option-to-break-urls-with-carriage-return-symbol}
\parbox{3cm}{\myurl}

\bigskip

\parbox{4cm}{\myurl}

\bigskip

\parbox{5cm}{\myurl}
\end{document}

yields

-

As you are using hyperref, it's possible to break URLs manually. That gives you the freedom to put any character you care to in between the two halves, and more generally to fine tune the output.

The thing you need to be careful about is that the broken halves point to the right thing -- you can achieve that by using \href and \nolinkurl in place of \url.

\documentclass{article}
\usepackage{hyperref}
\usepackage{parskip}

\begin{document}
$$\hookleftarrow$$\\


text:
# A more efficient approach to existing JavaScript coding

I am now working on a Node.js project, and on my ejs view page, I'm retrieving this array of objects, like:

[{ name: 'Andy',
age: 20,
{name: 'Terry',
age: 21,

My objective is to make use of this data to dynamically create and inject content using JavaScript. My existing approach is:

1. Put this data into a variable, say usersObjArr.
2. Set number of user blocks to be shown per row with a variable, say numUsersPerRow=3.
3. Calculate the number of rows I will need, like numRows=getNumRows(usersObjArr.length);
4. If there is only one row of content needed, simply go through the array of objects and push them into the row:

for(var j=0;j<usersObjArr;j++){
insertUserBlock();//pushes user objects one by one into the row
}

5. Else if there is more than one row, check that I am not working with the last row. As long as it is not the last row, insert the predetermined number of user blocks using the array of objects. Like:

for(var i=0;i<numRows;i++){
if(i!=(numRows-1)){
//as long as it's not the last row, insert 3 users
for(var k=0;k<numUsersPerRow;k++){
insertUserBlock(i); //insert 3 blocks into the row specified by the argument
}

6. On the other hand, if it is the last row, then I will insert the number of users equivalent to the remainder:

else{
for(var k=0;k<usersObjArr.length%numGamesPerRow;k++){
insertUserBlock(i);
}
}

I can't help but feel that this is not the most efficient approach. I am a web designer turned frontend developer and have a weak programming background, so I can really do with some advice on how to improving my coding above.

==========UPDATED==========

Here's the full code:

function getNumRows(numOfUsers){
return Math.ceil(numOfUsers/3);
}

function insertUserBlocks(usersObjArr){
numUsersPerRow=3,
numRows=getNumRows(usersObjArr.length);
if(usersObjArr.length<numUsersPerRow){
//if only one row worth of users, then insert just one row and push userblocks based on number of users
insertUserRow();
for(var j=0;j<usersObjArr.length;j++){
insertUserBlock();
}
}
else{
//if more than 3 users, we need to insert more than one row, and insert users into first row, then second, and so on
var numUsers=usersObjArr.length;
for(var i=0;i<numRows;i++){
insertUserRow(i);
if(i!=(numRows-1)){
//as long as it's not the last row, insert 3 users
for(var k=0;k<numUsersPerRow;k++){
insertUserBlock(i);
insertUserBlockContent(i,k,usersObjArr[numUsers-1]);//insert userContent based on last index of usersObjArr; minus one because of zero-based index
numUsers--;
}
}
else{
//otherwise, insert number of users equivalent to the remainder
for(var l=0;l<usersObjArr.length%numUsersPerRow;l++){
insertUserBlock(i);
insertUserBlockContent(i,l,usersObjArr[numUsers-1]);
numUsers--;
}
}
}
}
}

function insertUserRow(rowNumber){
if(arguments.length==0)
$('#main').append('
'); else$('#main').append('
');
}

function insertUserBlock(rowNum){
if(arguments.length==0){
$('#main .row-fluid').append('
'); } else{$('#row'+rowNum).append('
');
}
}

function insertUserBlockContent(rowNum,blockNum,userObj){
userPic=userObj['pic'],
userNickname=userObj['nickname'],
userUrl=userObj['url'];
$('#row'+rowNum+' .span4').eq(blockNum).append('').append('
');$('#row'+rowNum+' .span4 div').eq(blockNum).append('
'+userName+'
').append('
'+userNickname+'
').append('Website');
}

Basically what I'm trying to achieve is to extract the data and use it to insert rows of user content into the page. Maybe it's because of the rigid HTML structure in place? (I'm using Bootstrap.) I feel like my approach isn't quite efficient.

• Hello and welcome to Code Review! I'm not sure I understand what you're trying to do. Can you describe a bit more your goal here? What does insertUserBlock do? Can we see all the code you're describing here? Thank you. Dec 9 '13 at 13:16

function createUserList(users) {
var $table =$('
');
for (var i = 0; i < users.length; i++) {
if (i % 3 === 0) {
var $row =$('
').appendTo($table); }$row.append(createUserBlock(users[i]));
}
return $table; } function createUserBlock(user) { return$('
', {'class': 'user-block', 'text': user.name});
}

$('#main').append(createUserList(users));  Instead of querying and updating elements in the document with $('#row'+rowNum+' .span4 div') try to build a detached fragment, and insert it as one whole. The difference in speed is very noticeable on large data sets.

Try to access elements through variables. You can create a row and then store it in a variable $row, and then access it as $row.append(...). This is both easier to read and faster than $('#row'+rowNum+' .span4').append(...). '
'+userNickname+'
' - there are several reasons why you shouldn't concatenate unescaped plain text with HTML, but the main reason is cross-site scripting. Imagine if some user's nickname is . You probably don't want to allow someone to redirect your visitors to another site, or create fake login forms, or steal cookies. Here's how you can avoid that: $('
').text(userName)

• Thank you for your advice! Your code is so much more compact and cleaner compared to mine. I especially love the line if (i % 3 === 0) that checks if we are coming to a new row. I've learned a lot through your code. Cheers. :) Dec 23 '13 at 9:13

The most simple and probably what will save you some time in the future is to wrap every JSON object into a
 and add all of your wrapper divs into another div (or whatever element that might be best for your purpose). Then just style it using CSS.

Here is an jsfiddle example (this could be improved ten-folds, as it's just a proof of concept)

So as you can see, a very simple holder div (rename as you see fit), the given data, an (unoptimized) loop to iterate every item in your array, and a very small CSS.