text:
# Is there a way of intuitively grasping the magnitude of Graham's number?

I have heard it stated before that Graham's number is so vast that it is completely beyond comprehension. It is way larger than the number of atoms in the universe, so cannot be related to real quantities, and unfathomably larger than even hypothetical quantities, such as the number of Planck unit-sided cubes that could fit in the observable universe.

People usually stop at this point, and state that it is simply beyond comprehension, which is fair enough. However, I want to know more about what numbers are within comprehension, and what "intutitional" devices can be used to comprehend them. For instance, I considered combinatorial analogies, such as the number of different ways there are of selecting half the atoms in the universe (which contains $10^{80}$ atoms):

$$10^{80} \choose 5 \times 10^{79}$$

or the number of different ways there are of visiting every single atom in the universe exactly once ("universal atom tours"?):

$$10^{80}! \over 2$$

or even, the number of ways of selecting half the universal atom tours!

$${10^{80}! \over 2} \choose {10^{80}! \over 4}$$

Clearly we can continue in this manner, sacrificing semantic succinctness and intuitive meaning for further gains in magnitude. Even if, as I imagine is the case, these quantities barely scratch the surface of Graham's number, I suppose I am asking two things:

• How can the magnitudes of extremely large constructs like the ones I've given be evaluated and compared?

• Even if Graham's number is out of reach, what are some particularly effective 'intuitional devices' for explaining the scale of extremely large quantities to laymen like myself?

Thanks.

• "[Graham's number]," it says, "is big. Really big. You just won't believe how vastly, hugely, mindbogglingly big it is. I mean, you may think it's a long way down the road to [a googolplex], but that's just peanuts to [Graham's number], listen..." – Qiaochu Yuan Jul 14 '13 at 18:10
• – John Bentin Jul 14 '13 at 21:19
• See if you can get a copy of Asimov's essay "Skewered!" about making sense of Skewes' number (also phenomenally large). He goes through a process similar to the one you begin above. Hint: he ultimately fails. – Ryan Reich Jul 21 '13 at 4:40
• @ryan-reich I can't get hold of "Skewered!" sadly, but according to my evaluation the number of ways of selecting half the universal atom tours is larger than Skewes' number. It is at least in the same ballpark (I think), which suggests Skewes' number is within reach of intuition (or at least, the stretched form of intuition I speak of in the OP). – timxyz Jul 22 '13 at 10:42

I'm about to prove that Graham's number is a number that is so big there is no way of intuitively grasping the magnitude of it, but in order to do this we must start with the very small and work our way up.

We will start with the number 9 which can represented as 3+3+3. This isn't so bad when you only have three 3's to write down, but what happens if I pick a number that isn't practical to be represented by +3's, like 729, I would need the sum of 243 3's, so now let's use multiplication. 729 can now be represented as 3*3*3*3*3*3 now I can represent larger numbers than before, but I run into the same problem. I can pick a number that isn't practical to be represented by the repetition of the same operator of multiplication.

7,625,597,484,987, for example, is the multiplication of 27 3's. That isn't good way to represent this number so now let's use powers to represent this number which is $3^{3^3}$, another way to represent this is $3 \uparrow 3 \uparrow 3$ where each single arrow is "to the power of operator".

Mathematicians realized when dealing with numbers that aren't practical to write down in one operator, a new operator is required that is more powerful the previous one. Arrow notation is a way of going from one operator to another with ease. $\uparrow \uparrow$ is the next operator up from $\uparrow$, just as $\uparrow$ is the next operator up from multiplication, and just as multiplication is one operator up from addition. So increasing the number of consecutive arrows will increase the ability to work with larger and larger numbers.

So we saw how the size of numbers that were created when using $\uparrow$. Now let's look at the $\uparrow \uparrow$. $3\uparrow \uparrow3\uparrow \uparrow3$ = $3\uparrow \uparrow(3\uparrow3\uparrow3)$=$3\uparrow \uparrow7,625,597,484,987$. Which means this is $\uparrow3$ is used on 3, 7,625,597,484,987 times!

${{{{{{{{{{3}^3}^3}^3}^3}^3}^3}^3}^3}^\cdot\Rightarrow}$ a stack of threes 7,625,597,484,987 high!

To calculate this value start with the top 3 and move downward.
$3^3 = 27$
$3^{27}=7,625,597,484,987$
$3^{7,625,597,484,987}$ is 3,638,334,640,024 digits long.
The fourth 3 is very large, but googolplex is 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 digits long. So still somewhat in our comprehension, but the fifth 3 is way out of our comprehension.
3 is raised to the power of a number that is 3,638,334,640,024 digits long.
Googolplex is 10 raised to the power of a number that is 101 digits long.
So we have used only 5 of the 3's on the 7,625,597,484,987 stack and it already becomes difficult to imagine, but this process is repeated over 7.6 trillion times. Doing this process 5 times took us from 3 to a number that makes googolplex look tiny. So the answer to the stack of 7,625,597,484,987 3's is a stupidly big number. This number is so big that if you memorized all the digits of this number your head would turn into a black hole. The maximum amount of entropy that can be stored in your head carries less information than the information of this stack of 3's.

$$\begin{array}{c|l|c|r} \text{operator representation} & \text{value} & \text{number of previous operator equivalent} \\ \hline 3*3*3 & 27 &\text{9 (+3)'s or 3+3+3+3+3+3+3+3+3}\\ 3\uparrow3\uparrow3& 7,625,597,484,987 &\text{27 (x3)'s or 3^{27}} \\ 3\uparrow\uparrow3\uparrow\uparrow3 & \text {stupidly big} & \text{7,625,597,484,987 (\uparrow 3)'s}\\ 3\uparrow\uparrow\uparrow3\uparrow\uparrow\uparrow3 & G_1 & \text {stupidly big (\uparrow\uparrow3)'s} \\ \end{array}$$

If you look at the table above you will notice that $3\uparrow\uparrow\uparrow3\uparrow\uparrow\uparrow3=G_1$.
Why is $G_1$ important? Well I'll get to that in a minute. But first I have to explain that each change from one operation to the next is unimaginably bigger than previous change so you would think that adding a few arrows would quickly get us to Graham's number, but it doesn't. It doesn't even come close.

So what if I were to put a subscript on the arrows to indicate how many arrows I have. So $3\uparrow_{1000000}3$ is one million arrows, so I am one million operations above multiplication and 999998 operations above "stupid big" and the value of each operation is unimaginably bigger than the previous one. So, surely I must have hit Graham's number by now. The answer is no.

Remember $G_1$? Well, I'm going to write this, $3\uparrow_{G_1}3$.

So let's see if I can break this down.

"stupidly big" made googolplex look tiny after 5 of 7,625,597,484,987 iterations. Applying $\uparrow\uparrow3$ to 3 "stupidly big" times gives me $G_1$ and $G_1$ is now going to be the number of times the operator is increased. Where each operation is unimaginably bigger in comparison to the previous one. So how well do I stand against Graham's number at this point? Not even close.

Finally,

$G_2$=$3\uparrow_{G_1}3$
$G_3$=$3\uparrow_{G_2}3$
$G_4$=$3\uparrow_{G_3}3$
$\vdots$
$\vdots$
$G_{64}$=$3\uparrow_{G_{63}}3=\text{Graham's number}$

• I think that you just turned me into an ultra-finitist. – Baby Dragon Jul 21 '13 at 4:57
• AMAZING!!!! Too good a description. This answer deserves a $G_{64}$ number of upvotes. (obviously exaggerating!) – Parth Thakkar Jul 21 '13 at 10:56
• Great answer. Seems silly now to have ever considered Graham's number as accessible to intuition! I still wonder what its limits are however, and what functions particularly effective intuitional devices would take advantage of. – timxyz Jul 22 '13 at 10:48
• So why stop at $G_{64}$? What about $G_{G_{64}}$? or $G_{G_{G_{64}}}$? And what if we increase the supscript-stack up to $G_{64}$ layers? You will get to even unbelievable bigger numbers – Hubert Schölnast Jul 3 '15 at 9:56
• @HubertSchölnast in terms of fast growing hierarchy (my answer below) you will find that regardless of how you layer it, you'll never beat, say, $f_{\omega^\omega}(n)$. Indeed, this is so much larger than layers of layers of layers of $G$... Or even if we stack the layers $G64$ times... You'll never get there. Indeed, if you have heard that, say, TREE(3) is beyond comprehensive power...the fast growing hierarchy will prove you wrong :-) – Simply Beautiful Art Mar 8 '17 at 11:59

Imagine all of the atoms in the universe, we dont know how many their are, but lets say it's x. Now if each atom in the universe contained another universe inside, and each atom inside that contained yet another universe, and that pattern continued on x amount of times. If you added up the total number of atoms in all of the universes then you would still be less than the googleplexth root of grahams number. :)

I'm going to take this one step further than quantus14. Once you reach Graham's number, the question then becomes

How to effectively compare and understand even larger numbers?

Well, the first thought should be to see if you can find a similar number to yours on the Googology Wiki, which is dedicated entirely to large numbers and their study.

My second recommendation is to learn fast growing hierarchy (FGH), which has a similar construction to Knuth's up-arrow notation, but it extends much further. Here is a good YouTube series.

We define the first two rules of FGH as follows:

1. $f_0(n)=n+1$

2. $f_{\alpha+1}(n)=\underbrace{f_\alpha(f_\alpha(\dots f_\alpha(n)\dots))}_{n\text{ amount of }f_\alpha's}$

A quick demonstration will show you how fast this grows:

\begin{align}f_1(5)&=f_0(f_0(f_0(f_0(f_0(5)))))\\&=f_0(f_0(f_0(f_0(6))))\\&=f_0(f_0(f_0(7)))\\&=f_0(f_0(8))\\&=f_0(9)\\&=10\end{align}

\begin{align}f_2(5)&=f_1(f_1(f_1(f_1(f_1(5)))))\\&=f_1(f_1(f_1(f_1(10))))\\&=f_1(f_1(f_1(20)))\\&=f_1(f_1(40))\\&=f_1(80)\\&=160\end{align}

\begin{align}f_2(160)&=\underbrace{f_1(f_1(\dots f_1(160)\dots))}_{160}\\&=5\times2^{165}\\f_3(5)&=f_2(f_2(f_2(f_2(f_2(5))))\\&=f_2(f_2(f_2(f_2(160)))\\&=f_2(f_2(f_2(f_2(f_2(5))))\\&=f_2(f_2(f_2(5\times2^{165}))\\&=f_2(f_2(\underbrace{f_1(f_1(\dots f_1(5\times2^{165})\dots))}_{5\times2^{165}})\end{align}

Indeed, you will find these numbers quickly exceed anything you could hope to write on a sheet of paper.

We also have approximations to your numbers, and by a quick check, they are around the range of $f_4(n)$ for some small values of $n$.

...and then we have rule 3:

1. $f_\alpha(n)=f_{\alpha[n]}(n)$

This rule is a little bit confusing, so let me explain:

$\alpha$ is a limit ordinal, which basically translates into the limit of some sequence of numbers (a list of numbers (or a list of lists) if you are a programmer):

$$\alpha=\sup\{\alpha[1],\alpha[2],\alpha[3],\dots\}$$

We first define $\omega$ to be the limit of the following sequence:

$$\omega=\sup\{1,2,3,\dots\}$$

We then have $\omega[5]=5$ as the fifth term of this sequence, so

$$f_\omega(5)=f_{\omega[5]}(5)=f_5(5)$$

And from there we know this is very large...much larger than the previous numbers.

To deal with $\omega+1$, we apply the second rule, followed by the third:

\begin{align}f_{\omega+1}(5)&=f_\omega(f_\omega(f_\omega(f_\omega(f_\omega(5)))))\\&=f_\omega(f_\omega(f_\omega(f_\omega(f_5(5)))))\end{align}

So you can see how large this gets, and it gets pretty big. Graham 's number has a nice approximation:

$$f_{\omega+1}(64)\approx\text{Graham 's number}$$

So this is rather simple and

$$f_{\omega+1}(64)=\underbrace{f_\omega(\dots f_\omega(64)\dots)}_{64}$$

Note that we can even go further:

$$\omega\cdot2=\sup\{\omega+1,\omega+2,\omega+3,\dots\}$$

For example:

\begin{align}f_{\omega\cdot2}(5)&=f_{\omega+5}(5)\\&=f_{\omega+4}(f_{\omega+4}(f_{\omega+4}(f_{\omega+4}(f_{\omega+4}(5)))))\end{align}

And we would then expand further and further and further...

And we have some other larger ordinals:

$$\omega^2=\{\omega\cdot1,\omega\cdot2,\omega\cdot3,\dots\}$$

And beyond!

$$\omega^\omega=\{\omega^1,\omega^2,\omega^3,\dots\}$$

While it's not very... visual, it does become clear that you can make some very very big numbers while also being able to compare large numbers. One of the great advantages of FGH is the clearness of how to compare Graham's number to another number.

And the only thing holding you back from producing even larger numbers is how you want to define even larger ordinals.

And one last example:

\begin{align}f_{\omega^\omega}(3)&=f_{\omega^3}(3)\\&=f_{\omega^2\cdot3}(3)\\&=f_{\omega^2\cdot2+\omega^2}(3)\\&=f_{\omega^2\cdot2+\omega\cdot3}(3)\\&=f_{\omega^2\cdot2+\omega\cdot2+3}(3)\\&=f_{\omega^2\cdot2+\omega\cdot2+2}(f_{\omega^2\cdot2+\omega\cdot2+2}(f_{\omega^2\cdot2+\omega\cdot2+2}(3)))\\&=\cdots\end{align}


text:
# VLAD- An extension of Bag of Words

Recently, I was a participant at TagMe- an image categorization competition conducted by Microsoft and Indian Institute of Science, Bangalore. The problem statement was to classify a set of given images into five classes: faces, shoes, flowers, buildings and vehicles. As it goes, it is not a trivial problem to solve. So, I decided to attempt my existing bag-of-words algorithm on that. It worked to an extent, I got an accuracy of 86% approximately with SIFT features and an RBF SVM for classification. In order to improve my score though, I decided to look at better methods of feature quantization. I had been looking at VLAD (Vector of Locally Aggregated Descriptors): A first order extension to BoW for my Leaf Recognition project.

So, I decided to attempt to use VLAD using OpenCV and implemented a small function based on the BoW API currently in OpenCV for VLAD. The results showed remarkable improvement with an accuracy of 96.5 % using SURF descriptors on teh validation dataset provided by the organizers.

Recalling BoW, it involved simply counting the no. of descriptors associated with each cluster in a codebook(vocabulary) and creating a histogram for each set of descriptors from an image, thus representing the information in a an image in a compact vector. VLAD is an extension of this concept. We accumulate the residual of each descriptor with respect to its assigned cluster. In simpler terms, we match a descriptor to its closest cluster, then for each cluster, we store the sum of the differences of the descriptors assigned to the cluster and the centroid of the cluster. Let us have a look at the math behind VLAD..

### Mathematical Formulation

As with bag of words, we first train a codebook from the descriptors from our training dataset, as $C=\{c_1,c_2,...c_k\}$ where $k$ is the no. of clusters in K-means. We then associate each $d$-dimensional local descriptor, $x$ from an image with its nearest neighbour in the codebook.

The idea behind VLAD feature quantization is that, for each cluster centroid, $c_i$, we accumulate the difference $x-c_i$ where for each $x$, $c_i = NN(x)$

Representing the VLAD vector for each image by $v$, we have,

$v_{ij} =\sum_{x|x=NN(c_i)} {(x_j - c_{ij})}$

where $i=1,2,3...k$ and $j=1,2,3..d$

The vector $v$ is subsequently normalized with its $L_2$ norm as $v=\frac{v}{\|v\|_2}$

### Comparison with BoW

The primary advantage of VLAD over BoW is that we add more discriminative property in our feature vector by adding the difference of each descriptor from the mean in its voronoi cell. This first order statistic adds more information in our feature vector and hence gives us better discrimination for our classifier. This also points us to other improvements we can   adding higher order statistics to our feature encoding as well as looking at soft assignment,i,e. assigning each descriptor multiple centroids weighed by their distance from the descriptor.

### Experiments

Here are a few of my results on the TagMe dataset.

There are several extension possible for VLAD, primarily various normalization options. Arandjelov and Zissermann in their paper, All about VLAD, propose several normalization techniques, including intra normalization and power normalization alonging with a spatial extension – MultiVLAD. Delhumeau et al, propose several different normalization techniques as well as a modification to the VLAD pipeline to show improvements to almost state of the art.

Other references also stress on spatial pooling i.e. dividing your image into regions to get multiple VLAD vectors for each tile to better represent local features and spatial structure. A few also advise soft assignment, which refers to assignment of descriptors to multiple clusters, weighed by their distance from the cluster.

### Code:

Here is a link to my code for TagMe. It was a quick has job for testing so it is not very clean though I am going to clean it up soon.

also, a few references for those who want to read the papers I referred:

Well, that concludes this post. Be on the lookout for more on image retrieval – improvements to VLAD and Fisher Vectors.

# Bag of Words – Object Recognition

Hey guys,

Its been a really long time since my last post. But this series of posts is going to be a really cool I hope.

Today we are going to discuss one of the most important problems in Computer Vision- Object Recognition. We humans tend to trivially recognize objects without consciously paying attention to the fact or even wondering how exactly do we achieve this. You look at a baseball flying towards your face, you recognize it as a baseball about to break your nose, and you duck! All in a matter of a few microseconds.

But the process that your brain undertakes in those few microseconds has eluded perfect implementation in computation for several years now. Object recognition is perhaps, rightly considered the primary problem in computer vision. But recent research advances have made strides in this matter.

I recently undertook a project in which I had to classify leaves into species they come from. And as it sounds, it’s not really a trivial problem. It took me a few days to figure out the first steps to such a process. And to start of with I decided to use the Bag-of Words model, a highly cited method for scene and object classification for the above problem.

To begin with, I found a really nice dataset to work with here: http://flavia.sourceforge.net/ . The dataset contains images for 32 species of leaves on plain white backgrounds which simplified my experiment. I am really grateful to them for providing such a comprehensive dataset for free on the web. (Kinda all for Open Access now.).

Bag of words is a basically a simplified representation of an image. Its actually a concept taken form Natural Language Processing where you represent documents as an unordered collection of words disregarding grammar. Translating this into CV jargon, it means that we simplify images by picking out features from an image and representing it as a collection of features. A good explanation of what features are can be found at my friend, Siddharth’s blog here.

To get more technical about the BoW- we construct a vocabulary of features. We then use this vocabulary to create histograms from features for each image and then use a simple machine learning algorithm like SVM or Naive Bayes for classification.

This is the algorithm I followed for BoW. I got a lot of help from Roy’s blog here.

1. We pick out features from all the images in our training dataset. I used SIFT (Scale Invariant Feature Transform).

2. We cluster these features using any clustering algorithm. I used K-Means. (Pretty fast in OpenCV)

3. We use the cluster as a vocabulary to construct histograms. We simply count the no. of features from each image belonging to each cluster. Then we normalize the histograms by dividing it with the no. of features. Therefore, each image in the dataset is represented by one histogram.

4. Then these histograms are passed to an SVM for training. I currently use a Radial Basis function multi-class SVM in OpenCV. Using OpenCV’s CvSVM::train_auto() function, we get parameters for the SVM using cross validation.

Now why does Bag of Words work? Why use it rather than simple feature matching? The answer to that question is simple: features provide just local information. Using the bag-of-words model we create a global representation of an object. Thus, we take a group of features, create a representation of the image in a simpler form and classify it.

That was for the pros of the algorithm. But there are a few cons associated with this model.

1. As evident, we cannot localize an object in an image using this model. That is to say, the problem of finding where the object of interest lies is still open and needs other methods.

2. We neglect grammar. In CV terms, it means we neglect the position of features relative to each other. Thus the concept of a global shape maybe lost.

As for our Leaf Recognizer, we are still working on improving the accuracy. We are almost at our goal! The following are some of the images we got as a result of the above algorithm:

format: plain


text:
# Find the Variance 1/2 , 1/9 , 1/16

12 , 19 , 116
The mean of a set of numbers is the sum divided by the number of terms.
x‾=12+19+1163
Simplify the numerator.
To write 12 as a fraction with a common denominator, multiply by 99.
x‾=12⋅99+19+1163
To write 19 as a fraction with a common denominator, multiply by 22.
x‾=12⋅99+19⋅22+1163
Write each expression with a common denominator of 18, by multiplying each by an appropriate factor of 1.
Multiply 12 and 99.
x‾=92⋅9+19⋅22+1163
Multiply 2 by 9.
x‾=918+19⋅22+1163
Multiply 19 and 22.
x‾=918+29⋅2+1163
Multiply 9 by 2.
x‾=918+218+1163
x‾=918+218+1163
Combine the numerators over the common denominator.
x‾=9+218+1163
x‾=1118+1163
To write 1118 as a fraction with a common denominator, multiply by 88.
x‾=1118⋅88+1163
To write 116 as a fraction with a common denominator, multiply by 99.
x‾=1118⋅88+116⋅993
Write each expression with a common denominator of 144, by multiplying each by an appropriate factor of 1.
Multiply 1118 and 88.
x‾=11⋅818⋅8+116⋅993
Multiply 18 by 8.
x‾=11⋅8144+116⋅993
Multiply 116 and 99.
x‾=11⋅8144+916⋅93
Multiply 16 by 9.
x‾=11⋅8144+91443
x‾=11⋅8144+91443
Combine the numerators over the common denominator.
x‾=11⋅8+91443
Simplify the numerator.
Multiply 11 by 8.
x‾=88+91443
x‾=971443
x‾=971443
x‾=971443
Multiply the numerator by the reciprocal of the denominator.
x‾=97144⋅13
Multiply 97144⋅13.
Multiply 97144 and 13.
x‾=97144⋅3
Multiply 144 by 3.
x‾=97432
x‾=97432
Divide.
x‾=0.2245370‾
The mean should be rounded to one more decimal place than the original data. If the original data were mixed, round to one decimal place more than the least precise.
x‾=0.2
Set up the formula for variance. The variance of a set of values is a measure of the spread of its values.
s2=∑i=1n(xi-xavg)2n-1
Set up the formula for variance for this set of numbers.
s=(12-0.2)2+(19-0.2)2+(116-0.2)23-1
Simplify the result.
Simplify the numerator.
To write -0.2 as a fraction with a common denominator, multiply by 22.
s=(12-0.2⋅22)2+(19-0.2)2+(116-0.2)23-1
Combine -0.2 and 22.
s=(12+-0.2⋅22)2+(19-0.2)2+(116-0.2)23-1
Combine the numerators over the common denominator.
s=(1-0.2⋅22)2+(19-0.2)2+(116-0.2)23-1
Simplify the numerator.
Multiply -0.2 by 2.
s=(1-0.42)2+(19-0.2)2+(116-0.2)23-1
Subtract 0.4 from 1.
s=(0.62)2+(19-0.2)2+(116-0.2)23-1
s=(0.62)2+(19-0.2)2+(116-0.2)23-1
Divide 0.6 by 2.
s=0.32+(19-0.2)2+(116-0.2)23-1
Raise 0.3 to the power of 2.
s=0.09+(19-0.2)2+(116-0.2)23-1
To write -0.2 as a fraction with a common denominator, multiply by 99.
s=0.09+(19-0.2⋅99)2+(116-0.2)23-1
Combine -0.2 and 99.
s=0.09+(19+-0.2⋅99)2+(116-0.2)23-1
Combine the numerators over the common denominator.
s=0.09+(1-0.2⋅99)2+(116-0.2)23-1
Simplify the numerator.
Multiply -0.2 by 9.
s=0.09+(1-1.89)2+(116-0.2)23-1
Subtract 1.8 from 1.
s=0.09+(-0.89)2+(116-0.2)23-1
s=0.09+(-0.89)2+(116-0.2)23-1
Divide -0.8 by 9.
s=0.09+(-0.08‾)2+(116-0.2)23-1
Raise -0.08‾ to the power of 2.
s=0.09+0.00790123+(116-0.2)23-1
To write -0.2 as a fraction with a common denominator, multiply by 1616.
s=0.09+0.00790123+(116-0.2⋅1616)23-1
Combine -0.2 and 1616.
s=0.09+0.00790123+(116+-0.2⋅1616)23-1
Combine the numerators over the common denominator.
s=0.09+0.00790123+(1-0.2⋅1616)23-1
Simplify the numerator.
Multiply -0.2 by 16.
s=0.09+0.00790123+(1-3.216)23-1
Subtract 3.2 from 1.
s=0.09+0.00790123+(-2.216)23-1
s=0.09+0.00790123+(-2.216)23-1
Divide -2.2 by 16.
s=0.09+0.00790123+(-0.1375)23-1
Raise -0.1375 to the power of 2.
s=0.09+0.00790123+0.018906253-1
s=0.09790123+0.018906253-1
s=0.116807483-1
s=0.116807483-1
Simplify the expression.
Subtract 1 from 3.
s=0.116807482
Divide 0.11680748 by 2.
s=0.05840374
s=0.05840374
s=0.05840374
Approximate the result.
s2≈0.0584
Find the Variance 1/2 , 1/9 , 1/16
Scroll to top


text:
# Two angles are supplementary. One angle is 5 degrees less than four times the other. What are the measures of the angles?

May 28, 2018

$a = {143}^{o}$, $b = {37}^{o}$

#### Explanation:

To be able to answer this, we must know what it means that the angles are supplementary. If you have two angles a and b and
$a + b = {180}^{o}$, they are supplementary.

As $a = 4 b - {5}^{o}$,
$a + b = 4 b - {5}^{o} + b = 5 b - {5}^{o} = {180}^{o}$
which gives $b = {185}^{o} / 5 = {37}^{o}$
Therefore $a = {180}^{o} - b = {143}^{o}$

May 28, 2018

$\textcolor{b l u e}{{143}^{\circ} , {37}^{\circ}}$

#### Explanation:

Let the angle be $\theta$

One angle is 5 degrees less than four times the other.

One angle is $4 \theta - 5$

The other angle is $\theta$

Supplementary implies:

$4 \theta - 5 + \theta = 180 \implies \theta = 37$

So the angles are:

$4 \left(37\right) - 5 = {143}^{\circ}$

${37}^{\circ}$


text:
# UpdateDocMode::NO_UPDATE not working for microsoft office extension files??

This post is a wiki. Anyone with karma >75 is welcome to improve it.

when microsoft office extension file is loaded with UpdateDocMode::NO_UPDATE descriptor it updates data when new link is referenced while for ods files data does not get updated, a zero is placed in place of link if new data is referenced for ods files.

edit retag close merge delete

@rv: This looks very much relevant to this comment by @Garima. Unfortunately, both that comment, and your question, lack steps to reproduce (specific macro code? specific mouse clicks?)

Do you expect others to try to invent themselves what you already have at hand, just to help you, with the risk of doing something differently (and not see what you see), and with the risk of seeing the same results but considering them OK and not realizing that you expect something else, and overall with risk of just wasting time? please try to be helpful to those who you are asking for help.

Also this question is relevant (some housekeeping to keep duplicates together).

( 2018-12-11 07:54:07 +0100 )edit

( 2018-12-11 10:29:26 +0100 )edit

Sigh...

I even reimplemented this as a StarBasic macro (so that others could check it), because - well, your "snippet" is basically useless.

Sub LoadAFile(oURL As String)
Dim oArgs(0) As New com.sun.star.beans.PropertyValue
Dim oDoc
oArgs(0).Name="UpdateDocMode"
oArgs(0).Value= com.sun.star.document.UpdateDocMode.NO_UPDATE
oDoc = StarDesktop.LoadComponentFromUrl(oURL, oURL, com.sun.star.frame.FrameSearchFlag.CHILDREN, oArgs())
End Sub

So what now? Can you please try to think what others will do with your data? what specifically do I need to check? if the link should be a OLE link? a cell reference? a DDE? to another document of same type? of another type? whatever?

Don't you think that it would be nice to prepare a test set zip with all the required files, and with the macro, and with descriptions like "using LO version XXX on OS YYY, I see this ...(more)

( 2018-12-11 10:46:30 +0100 )edit


text:
## Open Problems in Representing State Spaces for Cultural Transmission Models

 Created: 21 Jun 2020 Modified: 22 Jun 2020 BibTeX Entry RIS Citation Print

### Seriation Graphs

#### How large is the space of Laplacian spectra on unlabelled trees with N vertices?

Cayley’s theorem tells us the number of possible unlabelled trees on $$N$$ vertices: $$n^{n-2}$$. This can be very large (e.g., for $$n=20$$, around $$10^{23}$$). But the number of distinguishable Laplacian spectra may be much smaller. It is worth understanding how large this state space of spectra may be for different numbers of assemblages.


text:
# Definition:Folium of Descartes

## Definition

The folium of Descartes is the locus of the equation:

$x^3 + y^3 - 3 a x y = 0$

## Source of Name

This entry was named for René Descartes.

## Historical Note

Marin Mersenne had communicated to René Descartes the method devised by Pierre de Fermat for calculating the tangent to a curve.

René Descartes seems to have thought little of this method, believing that it was not sufficiently general to be useful.

The curve now known as the folium of Descartes was used by him as a challenge to Fermat, believing that he would be unable to use this method on it.

Reportedly he was seriously annoyed at Fermat when the latter solved it without any trouble.


text:
# 2.5 The fourier transform

 Page 1 / 1

## The fourier transform

Many practical problems in signal analysis involve either infinitely long or very long signals where the Fourier series is not appropriate. For thesecases, the Fourier transform (FT) and its inverse (IFT) have been developed. This transform has been used with great success in virtually all quantitativeareas of science and technology where the concept of frequency is important. While the Fourier series was used before Fourier worked on it, the Fouriertransform seems to be his original idea. It can be derived as an extension of the Fourier series by letting the length increase to infinity or the Fouriertransform can be independently defined and then the Fourier series shown to be a special case of it. The latter approach is the more general of the two, but the former is more intuitive .

## Definition of the fourier transform

The Fourier transform (FT) of a real-valued (or complex) function of the real-variable $t$ is defined by

$X\left(\omega \right)={\int }_{-\infty }^{\infty }x\left(t\right){e}^{-j\omega t}dt$
giving a complex valued function of the real variable $\omega$ representing frequency. The inverse Fourier transform (IFT) is given by
$x\left(t\right)=\frac{1}{2\pi }{\int }_{-\infty }^{\infty }X\left(\omega \right){e}^{j\omega t}d\omega .$
Because of the infinite limits on both integrals, the question of convergence is important. There are useful practical signals that do not have Fouriertransforms if only classical functions are allowed because of problems with convergence. The use of delta functions (distributions) in both the time andfrequency domains allows a much larger class of signals to be represented .

## Examples of the fourier transform

Deriving a few basic transforms and using the properties allows a large class of signals to be easily studied. Examples of modulation, sampling, and otherswill be given.

• If $x\left(t\right)=\delta \left(t\right)$ then $X\left(\omega \right)=1$
• If $x\left(t\right)=1$ then $X\left(\omega \right)=2\pi \delta \left(\omega \right)$
• If $x\left(t\right)$ is an infinite sequence of delta functions spaced $T$ apart, $x\left(t\right)=\sum _{n=-\infty }^{\infty }\delta \left(t-nT\right)$ , its transform is also an infinite sequence of delta functions of weight $2\pi /T$ spaced $2\pi /T$ apart, $X\left(\omega \right)=2\pi \sum _{k=-\infty }^{\infty }\delta \left(\omega -2\pi k/T\right)$ .
• Other interesting and illustrative examples can be found in .

Note the Fourier transform takes a function of continuous time into a function of continuous frequency, neither function being periodic. If "distribution"or "delta functions" are allowed, the Fourier transform of a periodic function will be a infinitely long string of delta functions with weights thatare the Fourier series coefficients.

where we get a research paper on Nano chemistry....?
what are the products of Nano chemistry?
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
Preparation and Applications of Nanomaterial for Drug Delivery
revolt
da
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
Got questions? Join the online conversation and get instant answers!


text:
# Havin' problem in vector direction

1. Oct 28, 2005

### kanki

What i have now is the initial relative position of A from B, which is 5j
initial velocity of A is 40i + 30j, the direction is changed so that it can overtake B.
Velocity of B is 12i + 16j.
I can find the speed of A, which is 50.
I tried to let the new velocity of A be 50(ai + bj), then here's the problem:
I tried to use
$$\\vec{r}_A = \\vec{r}_B$$
r_A=r_B for which r represents the displacement.
but there are 3 unknowns and i'm stuck there...
*I'm having problem with the latex code... hope u can understand

Last edited: Oct 28, 2005
2. Oct 28, 2005

### mathmike

so what are you trying tofind

3. Oct 28, 2005

### kanki

I'm trying to find the new direction of velocity of A

4. Oct 28, 2005

### mathmike

so do this

a is at the orgin

then b is at 0,5

if the vel of b is 12i + 16j

where would that put it in the next unit of time

5. Oct 28, 2005

### kanki

I'm sorry, the s should be located north of b,
so b is the origin, and a at (0,5).
If vel of b is 12i + 16j, then in next unit of time,
it'll reach the point (12,16).
What can it help me?
I still dun understand.

6. Oct 29, 2005

### mathmike

ok now what would be the vector be to get a to that point?

7. Oct 29, 2005

### kanki

12i + 11j?
u mean for A?
still dun understand.

8. Oct 29, 2005

### mathmike

if you are going from 5j to 12i + 16j then the vector be 12i + 16j

9. Oct 29, 2005

### kanki

What can i get from vector 12i + 11j, what to do next?
Sorry i'm too dumb... i need more explaination if possible...

10. Oct 31, 2005

### kanki

helo?
no one can help me?

11. Oct 31, 2005

### verty

What do you want to know? I don't understand this notion of 'to overtake B'. Do they mean to meet B (as in, calculating the angle to fire a bullet to hit a moving target)?

12. Oct 31, 2005

### verty

Well I'm guessing you want to know the new direction of A, such that A will meet B, like a bullet hitting a moving target.

I drew an obtuse triangle with sides {5,2x,5x}, then used the cos-rule (one angle is known) to get an equation in x, which I solved. Knowing x, one knows the lengths and finding the angle is just a small step away.

Last edited: Oct 31, 2005


text:
# In a resistor, the first three bands from left to right have colours yellow, violet and red. What is the value of the resistor in ohms.

1. 6700
2. 540
3. 52000
4. 4700

Option 4 : 4700

## Resistance MCQ Question 1 Detailed Solution

Concept:

The below equation shows the method to find the resistance:

Resistor Colour Coding uses colored bands to easily identify a resistor resistive value and its percentage tolerance. The resistor color code markings are always read one band at a time starting from the left to the right, with the larger width tolerance band oriented to the right side indicating its tolerance.

The value of the resistance is given in the form:

R = AB × C ± D%

Where,

‘A’ and ‘B’ indicates the first two significant figures of resistance (Ohms).

‘C’ indicates the decimal multiplies.

‘D’ indicates the tolerance in percentage.

The table for the resistor colour code is given below:

 Colour code Values (AB) Multiplier (C) Tolerance (D) Black 0 100 Brown 1 101 Red 2 102 Orange 3 103 Yellow 4 104 Green 5 105 Blue 6 106 Violet 7 107 Grey 8 108 White 9 109 Gold - - ± 5 % Silver - - ± 10 % No color - - ± 20 %

Calculation:

From the above resistance colour codes,

Y → 4

V → 7

‘Y’ and ‘V’ defines ‘A’ and ‘B’

Red, R → 102

‘Y’ defines C

Now, the resistance is:

R = 47 × 102 Ω

R = 4700 ohms

Shortcut Trick

BB ROY Great Britain Very Good Watch Gold and Silver

B - Black (0)

B - Brown (1)

R - Red (2)

O - Orange (3)

Y - Yellow (4)

G - Green (5)

B - Blue (6)

V - Violet (7)

G - Grey (8)

W - Whilte (9)

Tolerance - Gold(5%) and Silver(10%)

# A copper wire is 1 m long and has a uniform cross section of 0.1 mm2. The resistance of wire at room temperature is 0.171 Ω. What is the resistivity of the material?

1. 1.71 × 10-6 Ωm
2. 1.71 × 10-7 Ωm
3. 1.71 × 10-8 Ωm
4. 1.71 × 10-9 Ωm

Option 3 : 1.71 × 10-8 Ωm

## Resistance MCQ Question 2 Detailed Solution

Concept:

The resistance offered by a wire of unit length and unit area of cross-section is called resistivity or specific resistance (r).

Mathematically, this is defined as:

$$ρ=R.\frac{A}{l}$$

R is the resistance of the wire

A is the area of cross-section of the wire

l is the length of the wire.

Calculation:

With R = 0.171 Ω, l = 1 m and A = 0.1 mm2 = 0.1 × 10-6 m2

$$ρ=0.171× \frac{0.1× 10^{-6}}{1}$$

ρ = 1.71 × 10-8 Ωm

# Calculate Geq in the following circuit:

1.  8 S
2. 4 S
3. 6 S
4. 10 S

Option 2 : 4 S

## Resistance MCQ Question 3 Detailed Solution

Concept:

• Conductance is the measure of how easily electricity flows along a certain path through an electrical element. Represented with letter G.
• Conductance is the reciprocal of the Resistance and is measured in Siemens or mhos.

Equivalent Conductance in Series connection is represented as,

$${G_{eq}} = \frac{{{G_1}{G_2}}}{{{G_!} + {G_2}}}$$

Equivalent Conductance in parallel connection is represented as,

Geq = G1 + G2

Calculation:

In the given figure,

6 S, 12 S are in series apply series combination formula

4 S, 8 S are in parallel apply parallel combination formula

Circuit reduces to,

Then 2 S and 4 S are in parallel add them,

Then, $${G_{eq}} = \frac{{12 \times 6}}{{12 + 6}}\; = 4\;S$$

# What is the ratio of resistances of two copper conductors whose lengths are in the ratio 1 : 4 and radii in the ratio 1 : 2?

1. 1 : 2
2. 1 : 1
3. 2 : 1
4. 4 : 1

Option 2 : 1 : 1

## Resistance MCQ Question 4 Detailed Solution

Concept:

The resistance of a conductor is given by:

$$R = \rho\frac{{ ~l}}{A}$$

ρ = resistivity

R = Resistance

l = length of wire

A = cross-sectional area of the wire

Application:

Let R1 = Resistance of 1st copper conductor

R2 = Resistance of 2nd copper conductor

$$\frac{R_1}{R_2}=\frac{l_1/A_1}{l_2/A_2}$$

Since A = πr2, the above can be written as:

$$\frac{R_1}{R_2}=\frac{l_1/\pi r_1^2}{l_2/\pi r_2^2}=\frac{l_1r_2^2}{l_2r_1^2}$$

Given $$\frac{l_1}{l_2}=\frac{1}{4}$$and $$\frac{r_1}{r_2}=\frac{1}{2}$$

$$\frac{R_1}{R_2}=\frac{1}{4}\times (\frac{2}{1})^2$$

$$\frac{R_1}{R_2}=\frac{1}{1}$$

# The approximate equivalent resistance between terminals A and B for the following infinite ladder network comprising of 1 Ω & 2 Ω resistors is:

1. 1 Ω
2. 2 Ω
3. 4 Ω
4. 0.5 Ω

Option 2 : 2 Ω

## Resistance MCQ Question 5 Detailed Solution

Calculation:

Since the network contains infinite resistance, we can redraw the network as:

Now equating the equivalent resistance with RAB, we get:

$$\therefore {R_{AB}} = \frac{{{2 R_{AB}}}}{{{R_{AB}} \ + \ 2}} + 1$$

R2AB + 2RAB = 3 RAB + 2

R2AB - RAB - 2 = 0

Now solving the above quadratic equation for RAB, we get

R2AB - 2RAB + RAB - 2 = 0

RAB(RAB - 2) + 1(RAB - 2) = 0

RAB = 2 and RAB = -1

RAB = 2 Ω (∵ Resistance cannot be negative)

Hence option (2) is the correct answer.

# Two wires of the same metal have the same length, but their cross-section area in the ratio 3 : 1. They are joined in series. The resistance of the thicker wire is 10 Ω. The total resistance of the combination will be

1. 10 Ω
2. 20 Ω
3. 40 Ω
4. 100 Ω

Option 3 : 40 Ω

## Resistance MCQ Question 6 Detailed Solution

Resistance (R):

Resistance is a property of the conductor which opposes the current flow through it.

Resistance is measured in ohms and denoted by Ω.

Formula:

The resistance of a conductor measured as

$$R=\frac{ρ l}{A}$$ Ω

ρ = Specific resistivity of the conductor

l = Length of the conductor

A = Cross-sectional area of the conductor

$$A=\frac{\pi d^2}{4}$$

R ∝ (1 / A)

The thickness reminds the diameter of the conductor.

Calculation:

Let the resistance of a thick conductor is

R1 = 10 Ω

Another resistance is R2

The ratio of the areas is

A1 : A2 = 3 : 1

R ∝ (1/ A)

$$\frac{R_2}{R_1}=\frac{A_1}{A_2}$$

⇒ R= 3 x 10

∴ R2 = 30 Ω

The resistances are connected in series.

So, the equivalent resistance is

Req = R1 + R2

⇒ Req = 10 + 30

∴ Req = 40 Ω

# A resistor measures 4Ω at 40°C and 6Ω at 80°C. at T = 0°C the resistor will measure

1. 1.5Ω

Option 2 : 2Ω

## Resistance MCQ Question 7 Detailed Solution

Concept:

The resistance of most of the metals increases in a linear way with temperature as shown and can be represented by the equation:

RT = R0(1 + αT)

RT = Resistance at a temperature T

R0 = Resistance at 0°C

α = Temperature coefficient of the resistance

Calculation:

Given R40° = 4Ω and R80° = 6Ω. We can write:

4 = R0(1 + 40α)   ---(1)

6 = R0(1 + 80α)   ---(2)

Multiplying Equation (1) with 4 and Equation (2) with 2, we get:

16 = R0(4 + 160α)   ---(3)

12 = R0(2 + 160α)   ---(4)

Subtracting (4) with (3), we get:

16 - 12 = 4R0 - 2R0

2R0 = 4

R0 = 2 Ω

# Two materials A and B have resistance temperature coefficients 0.004 and 0.0004 per °C respectively at a given temperature. In what proportion should A and B be joined in series to produce a circuit having a temperature coefficient of 0.001.

1. 1 ∶ 5
2. 1 ∶ 2
3. 1 ∶ 4
4. 1 ∶ 3

Option 1 : 1 ∶ 5

## Resistance MCQ Question 8 Detailed Solution

Concept:

Effect of Temperature on Resistance:

• For pure metals, resistance increased with an increase in temperature, this is called the positive temperature coefficient of resistance.
• For semiconductors and insulators, resistance increased with decreases in temperature and vice-versa, this is called the negative temperature coefficient of resistance.

Temperature Coefficient of Resistance:

Let a metallic conductor having resistance R0 at 0°C be heated at t°C and resistance become Rt.

Increased in temperature = ΔR = Rt – R0

An increase in Resistance (ΔR) depends on:

• Directly proportional its initial resistance.
• Directly proportional to the rise in temperature.
• On the nature of the material.

∴ (Rt – R0) α (R × t)

or, (Rt – R0) = α R0 t    ---(1)

Where α is constant and known as the temperature coefficient of resistance.

From equation (1)

$$α = \frac{{{R_t} - {R_o}}}{{{R_o} × t}}$$

∴ Rt = R0 (1 + α t)

Calculation:

Let the resistance of material A (RA) = 1 Ω .... (1)

And Resistance of material B (RB) = x Ω .... (2)

∴ Resistance of series combination (Rc) = (1 + x) Ω

Consider temperature rise = t° C

Hence, the resistance of series combination at t° C will be, (Rct) is given as,

Rct = (1 + x)(1 + 0.001t) .... (3)

Similarly,

Resisistance of material A at t° C will be,

RAt = 1(1 + 0.004t) .... (4)

And, Resisistance of material B at t° C will be,

RBt = x(1 + 0.0004t).... (5)

Since, both the resistance is inseries,

∴ RAt + RBt = Rct

or, 1(1 + 0.004t) + x(1 + 0.0004t) = (1 + x)(1 + 0.001t)

or, 0.004t + 0.0004xt = (1 + x) × (0.001t)

Divided by t on both side,

0.004 + 0.0004x = (1 + x) × (0.001)

or, 0.004 + 0.0004x = 0.001 + 0.001x

or, 0.003 = 0.0006x

∴ x = 5

From equation (2),

Resistance of material B (RB) = x Ω = 5 Ω

∴ RA : RB = 1 : 5

Alternate Method

Consider the resistance of material A is RA and the temperature coefficient is αA and the resistance of material B is RB and the temperature coefficient is αB.

∴ $${α _A} = 0.004\;per^\circ C\;and\;{α _B} = 0.0004\;per^\circ C$$

Given the overall value of temperature coefficient when connected in series is α = 0.001 per ° C

By using concepts of Allegation and Mixture

$$\alpha _A^{new} = {\alpha _A} - \alpha = 0.004 - 0.001 = 0.003\;per^\circ C$$

And,

$$\alpha _A^{new} = {\alpha _A} - \alpha = 0.004 - 0.001 = 0.003\;per^\circ C$$

Therefore, the ratio of the resistance of two-wire will be:

$$\frac{{\alpha _A^{new}}}{{\alpha _B^{new}}} = \frac{{0.003}}{{0.0006}} = 5$$

# A resistance of 10 Ω is connected in series with two resistance, each of 15 Ω arranged in parallel. What resistance must be shunted across this parallel combination so that the total current taken shall be 1.5 A with 20 V applied voltage?

1. 8 Ω
2. 12 Ω
3. 5 Ω
4. 6 Ω

Option 4 : 6 Ω

## Resistance MCQ Question 9 Detailed Solution

Drawing the circuit diagram as per the question,

Given V = 20 V and I = 1.5 A

So, equivalent resistance = (V / I) .......(1)

Also, from circuit equivalent resistance = 10 + (7.5 || R) .........(2)

Equating equation (1) and (2)

$$\large{\frac{20}{1.5}=10+\frac{7.5R}{7.5+R}}$$

$$\large{\frac{40}{3}=10+\frac{7.5R}{7.5+R}}$$

$$\large{\frac{10}{3}=\frac{7.5R}{7.5+R}}$$

12.5 R = 75

R = 6 Ω

# What is the change in resistance of copper wire when the wire is stretched in length by 5 times and the diameter is halved?

1. 5 times
2. 10 times
3. 20 times
4. 40 times

Option 3 : 20 times

## Resistance MCQ Question 10 Detailed Solution

Concept:

• The property by which an electric conductor opposes the flow of current through it is called the resistance of the conductor.
• It is denoted by R.
• The SI unit of resistance is Ohm (Ω).

Mathematically, the resistance is given by the formula:

$$R=ρ\frac{l}{A}$$

ρ = Resistivity of the material

l = length of the material

A = Area of the cross-section

Since A = πr2, the above expression becomes:

$$R=\frac{\rho l}{\pi r^2} = \frac{4\rho l}{\pi d^2}$$

d = diameter of the wire

Application:

Initially, for a length 'l1' and diameter of 'd1', let the resistance be R1, i.e.

$$R_1= \frac{4\rho l_1}{\pi d_1^2}$$   ---(1)

After the wire is stretched by 5 times and the diameter is reduced to half, we have:

l2 = 5l1 and

$$d_2=\frac{d_1}{2}$$

The resistance will now be:

$$R_2= \frac{4\rho l_2}{\pi d_2^2}=\frac{4\rho (5l_1)}{\pi (d_1/2)^2}$$

$$R_2= \frac{80\rho l_1}{\pi d_1^2}$$   ---(2)

Dividing Equation (2) and (1), we get:

$$\frac{R_2}{R_1}=\frac{80}{4}$$

R2 = 20 times of R1

# Three resistances are connected in parallel. Total circuit current is 6A. Individual conductance of each parallel circuit are G1 = 1 S, G2= 3 S and G3 = 2 S. Then, current through G3 is:

1. 4 A
2. 1 A
3. 6 A
4. 2 A

Option 4 : 2 A

## Resistance MCQ Question 11 Detailed Solution

CONCEPT:

Resistance:

• The measurement of the opposition of the flow of electric current through a conductor is called resistance of that conductor. It is denoted by R.

There are mainly two ways of the combination of resistances:

1. Resistances in series:

• When two or more resistances are connected one after another such that the same current flows through them are called resistances in series.
• The net resistance/equivalent resistance (R) of resistances in series is given by:
• Equivalent resistance, R = R1 + R2

2. Resistances in parallel:

• When the terminals of two or more resistances are connected at the same two points and the potential difference across them is equal is called resistances in parallel.
• The net resistance/equivalent resistance(R) of resistances in parallel is given by:

$$⇒\frac{1}{R} = \frac{1}{{{R_1}}} + \frac{1}{{{R_2}}}$$

Calculation:

Reciprocal of resistance is conductance, we convert the conductances into resistances and the circuit will look like this

Given: R1 = 1 Ω , R2 = 1 / 3 Ω , R3 = 1 / 2 Ω

Taking eqivalent resistance of R1 and R2

$$R_{12} = \dfrac{1\times \frac13}{1+\frac13}=\frac14\; \Omega$$

Using current division:

I = $$I_{\frac12\Omega }=\dfrac{\frac14}{\frac14 + \frac12}\times 6 = 2\; A$$

# A lead wire and an iron wire are connected in parallel. Their respective specific resistances are in the ratio 40 ∶ 20. The former carries 80% more current than the latter, and the latter is 45% longer than the former. Determine the ratio of their cross-sectional areas latter to former.

1. 0.3
2. 0.4
3. 0.6
4. 0.5

Option 2 : 0.4

## Resistance MCQ Question 12 Detailed Solution

Concept:

Mathematically, Resistance is defined as:

$$R=\rho \frac{L}{A}$$

R is the resistance of the wire

A is the area of cross-section of the wire

L is the length of the wire.

Current division rule

By using the current division rule,

The current flows through the resistor R1 = I1 = $$\frac{{I\left( {{R_2}} \right)}}{{{R_1} + {R_2}}}$$ .......(1)

The current flows through the resistor R2 = I2 = $$\frac{{I\left( {{R_1}} \right)}}{{{R_1} + {R_2}}}$$......... (2)

From equation (1) & (2)

$$\frac{I_1}{I_2}=\frac{R_2}{R_1}$$ ......... (3)

Calculation:

Given

Current I1 = 80 % more than I2 = 1.8 I2

Length L2 = 45 % longer than L1 = 1.45 L1

ρ1 : ρ2 = 40 : 20

From equation (3)

$$\frac{R_2}{R_1}=\frac{I_1}{I_2}\Rightarrow \frac{R_2}{R_1}=\frac{1.8I_2}{I_2}=1.8$$

As resistance is given as $$R=\rho \frac{L}{A}$$

So $$\frac{R_2}{R_1}=\frac{\rho_2 \frac{L_2}{A_2}}{\rho_1 \frac{L_1}{A_1}}= \frac{\rho_2L_2A_1}{\rho_1L_1A_2}$$

$$\Rightarrow 1.8 =\frac{\rho_2L_2A_1}{\rho_1L_1A_2}=\frac{20\;\times\;1.45L_1A_1}{40\;\times\;L_1A_2}$$

$$\Rightarrow \frac{A_2}{A_1}=0.402$$

# A cable has two conductors, which are connected together at one end of the cable for testing purposes. When the cable is 700 m long, the resistance of the connected loop is found to be 100 Ω when measuring from the other end. The value of resistance of 8 km long same cable is _______.

1. 1,100 Ω
2. 1,134 Ω
3. 1,200 Ω
4. 1,143 Ω

Option 4 : 1,143 Ω

## Resistance MCQ Question 13 Detailed Solution

Concept:

Resistance: The property by which an electric conductor opposes the flow of current through it is called the resistance of the conductor.

It is denoted by R.

The SI unit of resistance is Ohm (Ω).

$$R = \frac{{ρ \;l}}{A}$$

Where ρ is the resistivity of a conductor, l is the length of the conductor and A is the cross-sectional area.

Calculation:

When the cable is 700 m long, the resistance of the connected loop is found to be 100 Ω.

Let,

l1 = 700 m
R1 = 100 Ω

For 8 km long cable,

l2 = 8 km = 8000 m

From the above concept,

$$R∝ l$$

∴ 100 Ω ∝ 700 m .... (1)

R2 ∝ 8000 m .... (2)

From equation (1) and (2),

$$\frac{R_2}{100}=\frac{8000}{700}$$

R2 = 1,143 Ω

# A conductor of 0.5 mm diameter wire has a resistance of 400 Ω. Find the resistance of the same length of wire if it's diameter were doubled.

1. 150 Ω
2. 50 Ω
3. 100 Ω
4. 200 Ω

Option 3 : 100 Ω

## Resistance MCQ Question 14 Detailed Solution

Concept:

Resistance,

$$R=\frac{ρ\ l}{A}$$ .......(1)

Where ρ = resistivity of the conductor (Ω m)

l = length of conductor (m)

A = cross-section area of conductor (m2)

A = π r2 .........(2)

Where r is the radius of the cross-section of the conductor.

Explanation:

From equations (1) and (2),

$$R\propto\frac{1}{r^2}$$ as length 'l' and resistivity 'ρ'  is constant.

$$\large{\frac{R_1}{R_2}=\frac{r_2^2}{r_1^2}}$$

Diameter is doubled means radius is doubled.

Given, R1 = 400 Ω , r2 = 2 r1

Where,

R1, r1 is the old resistance and old radius of the wire.

R2, r2 is the new resistance and new radius of the wire.

$$\large{\frac{400}{R_2}=\frac{(2r_1)^2}{(r_1)^2}=4}$$

R2 = 100 Ω

Therefore, new resistance R2 = 100 Ω

# Find the value of Geq in the following circuit.

1. 10 S

2. 20 S

3. 25 S

4. 15 S

Option 1 :

10 S

## Resistance MCQ Question 15 Detailed Solution

Concept:

Conductance (G) is the reciprocal of Resistance (R).

Unit of Conductance is siemens (S).

Calculation:

Given:

S1 = 6 S, S2 = 5 S, S3 = 20 S

So, $${R_1} = \frac{1}{{{S_1}}}=\frac{1}{6}\;{\rm{\Omega }}$$

$${R_2} = \frac{1}{{{S_2}}} = \frac{1}{5}\;{\rm{\Omega }}$$

$${R_3} = \frac{1}{{{S_3}}} = \frac{1}{{20}}\;{\rm{\Omega }}$$

$${R_{23}} = {R_2} + {R_3} = \frac{1}{5} + \frac{1}{{20}} = \frac{5}{{20}} = \frac{1}{4}\;{\rm{\Omega }}$$

$${R_{eq}} = \frac{{{R_1} \times {R_{23}}}}{{{R_1} + {R_{23}}}} = \frac{{\frac{1}{6} \times \frac{1}{4}}}{{\frac{1}{6} + \frac{1}{4}}} = \frac{{\frac{1}{{24}}}}{{\frac{{10}}{{24}}}} = \frac{1}{{24}} \times \frac{{24}}{{10}} = \frac{1}{{10}}{\rm{\;\Omega }}$$

$${S_{eq}} = \frac{1}{{{R_{eq}}}} = 10\;S$$

Shortcut Trick:-

In series

• Conductance are inversely (1/S) added.

In parallel

• Resistance are inversely (1/R) added.

So, conductance S2 and S3 are in series

Added inversely S23 = (5*20)/(5+20)= 100/25 = 4 S

Now, S1 and S23  are parallel added simple

Seq = 6+4 =10 S

# A color code of orange, orange, orange is for what ohmic value?

1. 22 kilo ohms
2. 3300 ohms
3. 44000 ohms
4. 33 kilo ohms

Option 4 : 33 kilo ohms

## Resistance MCQ Question 16 Detailed Solution

Concept:

• Resistances are available in small as well as in large values.
• The resistors are generally painted by a specific colour and a specific code is assigned to them. This is called colour coding of the resistance.
• The resistance valuetolerance, and wattage rating are generally printed on the body of the resistor as numbers or letters.

Colour Coding of Resistance: To know the value of resistance colour code is used:

Colour band A and B: Indicate the first two significant figures of resistance in ohms.

Band C: Indicates the decimal multiplier i.e. the number of zeros that follows the two significant figures.

Band D: Indicates the tolerance in percentage about the indicated value or in other words, it represents the percentage accuracy of the indicated value.

The tolerance in the case of gold is ±5% and in silver is ±10%. If only three bands are marked on carbon resistance, then it indicates a tolerance of 20%.

The table for the resistor colour code is given below:

 Colour code Values (AB) Multiplier (C) Tolerance (D) Black 0 100 Brown 1 101 1 Red 2 102 2 Orange 3 103 Yellow 4 104 Green 5 105 0.5 Blue 6 106 0.25 Violet 7 107 0.1 Grey 8 108 White 9 109 Gold - - $$\pm 5{\rm{\% }}$$ Silver - - $$\pm 10{\rm{\% }}$$ No colour - - $$\pm 20{\rm{\% }}$$

Calculation:

Given: A, B, and C of Orange colour. From the table, we get:

R = (AB) × C

R = 33 × 103 Ω

R = 33 kΩ

# The material of wires used for making standard resistances is usually:

1. manganin
2. phosphor bronze
3. nichrome
4. copper

Option 1 : manganin

## Resistance MCQ Question 17 Detailed Solution

Standard resistances wire:

• It is a wire used for a purpose like measuring voltage and current.
• It should be more accurate and it should give the same reading for the parameters even in different situations.
• Its resistance should be very small.
• The increment in resistance due to temperature variation should be very small i.e. temperature coefficient should be very small.
• These wires are made up of manganin (86% copper, 12% manganese, and 2% nickel)

# Usually resistances used in electronic circuitry use:

1. voltage and ohmic ratings
2. voltage and current ratings
3. ohmic and wattage ratings
4. current and wattage ratings

Option 3 : ohmic and wattage ratings

## Resistance MCQ Question 18 Detailed Solution

Rating of resistor:

Resistance is an element of a circuit or network which is inserted to lower the current in the circuit.

The unit of resistance is ohm and its symbol is Ω.

Usually, voltage V is constant 230 V (RMS) in household supply and wattage, P = V2/R

So, if we fix the value of R, Wattage(Power) will be fixed.

Or we can say if we know anyone between resistance(R) and wattage (P), others can be known.

Thus, the rating is ohmic and wattage for a resistor.

# What happens to the resistance of a conductor if its length is increased three times and diameter is halved?

1. Resistance remains the same
2. Resistance is increased 3 times
3. Resistance is increased 6 times
4. Resistance is increased 12 times

Option 4 : Resistance is increased 12 times

## Resistance MCQ Question 19 Detailed Solution

Concept:

• The property by which an electric conductor opposes the flow of current through it is called the resistance of the conductor.
• It is denoted by R.
• The SI unit of resistance is Ohm (Ω).

Mathematically, the resistance is given by the formula:

$$R=ρ\frac{l}{A}$$

ρ = Resistivity of the material

l = length of the material

A = Area of the cross-section

Since A = πr2, the above expression becomes:

$$R=\frac{\rho l}{\pi r^2} = \frac{4\rho l}{\pi d^2}$$

d = diameter of the wire

Application:

Initially, for a length 'l1' and diameter of 'd1', let the resistance be R1, i.e.

$$R_1= \frac{4\rho l_1}{\pi d_1^2}$$   ---(1)

After the wire is stretched 3 times and the diameter is reduced to half, we have:

l2 = 3l1 and

$$d_2=\frac{d_1}{2}$$

The resistance will now be:

$$R_2= \frac{4\rho l_2}{\pi d_2^2}=\frac{4\rho (3l_1)}{\pi (d_1/2)^2}$$

$$R_2= \frac{48\rho l_1}{\pi d_1^2}$$   ---(2)

Dividing Equation (2) and (1), we get:

$$\frac{R_2}{R_1}=\frac{48}{4}$$

R2 = 12 times of R1

# One-ohm is equal to:

1. 1 volt / 1 ampere
2. 1 volt / 1 coulomb
3. 1 volt × 1 ampere
4. 1 volt × 1 coulomb

Option 1 : 1 volt / 1 ampere

## Resistance MCQ Question 20 Detailed Solution

The correct answer is 1 volt / 1 ampere.

Key Points

• One-ohm is equal to 1 volt / 1 ampere.
• The SI unit of electrical resistance i.e Ohm is named in honour of the 19th-century German physicist Georg Simon Ohm.
 Quantity SI Unit Frequency Hertz Electric Potential Volt Capacitance Farad Magnetic Flux Weber Power Watt Magnetic Flux Density Tesla Work Joule Angle Radians Inductance Henry Electric Charge Coulomb


text:
# Step-by-step Solution

Go!
1
2
3
4
5
6
7
8
9
0
a
b
c
d
f
g
m
n
u
v
w
x
y
z
.
(◻)
+
-
×
◻/◻
/
÷
2

e
π
ln
log
log
lim
d/dx
Dx
|◻|
θ
=
>
<
>=
<=
sin
cos
tan
cot
sec
csc

asin
acos
atan
acot
asec
acsc

sinh
cosh
tanh
coth
sech
csch

asinh
acosh
atanh
acoth
asech
acsch

## Step-by-step Solution

Problem to solve:

$factor\left(x^4+x^3-6x^2-4x+8\right)$

Solving method

Learn how to solve factorization problems step by step online.

$1, 2, 4, 8$

Learn how to solve factorization problems step by step online. Factor the expression x^4+x^3-6x^2-4x+8. We can factor the polynomial x^4+x^3-6x^2-4x+8 using the rational root theorem, which guarantees that for a polynomial of the form a_nx^n+a_{n-1}x^{n-1}+\dots+a_0 there is a rational root of the form \pm\frac{p}{q}, where p belongs to the divisors of the constant term a_0, and q belongs to the divisors of the leading coefficient a_n. List all divisors p of the constant term a_0, which equals 8. Next, list all divisors of the leading coefficient a_n, which equals 1. The possible roots \pm\frac{p}{q} of the polynomial x^4+x^3-6x^2-4x+8 will then be. Trying all possible roots, we found that 2 is a root of the polynomial. When we evaluate it in the polynomial, it gives us 0 as a result.

$\left(x+2\right)^2\left(x-1\right)\left(x-2\right)$
SnapXam A2

### beta Got another answer? Verify it!

1
2
3
4
5
6
7
8
9
0
a
b
c
d
f
g
m
n
u
v
w
x
y
z
.
(◻)
+
-
×
◻/◻
/
÷
2

e
π
ln
log
log
lim
d/dx
Dx
|◻|
θ
=
>
<
>=
<=
sin
cos
tan
cot
sec
csc

asin
acos
atan
acot
asec
acsc

sinh
cosh
tanh
coth
sech
csch

asinh
acosh
atanh
acoth
asech
acsch

$factor\left(x^4+x^3-6x^2-4x+8\right)$


text:
Debugging graphs with ease: experimental Visual Studio plugin

Revision en12, by yeputons, 2019-05-21 20:26:57

Hi everyone!

I'd like to present you a prototype of Visual Studio plugin which was developed by a student from my university as a coursework. Yielding floor to her:

GraphAlgorithmRenderer is an experimental Visual Studio extension for debugging and visualizing graph algorithms. It takes a description of graph nodes, edges and their properties, such as color and label, and renders a corresponding graph. The graph is refreshed automatically when you step in debugger. Graph config can be serialized to JSON and deserialized back.

More explanations and detailed example can be found here. Samples of the serialized config, C++ code, and the snapshots are here. Any feedback on this tool is welcome, please try it out!

Here is the list of known issues:

1. Sometimes text boxes in Graph Visualization settings seem to be blocked and a text cannot be entered or it appears somewhere else, for example in the file with the code. You can try to close all other windows including the source file (it doesn't mean closing the Solution or stopping the debugger). We would be grateful if you help us to find out how to reproduce this bug.
2. The UI is quite primitive and not very user-friendly at the moment That wasn’t our first priority, but we’d appreciate any simple-to-implement suggestions.
3. The Standard Template Library functions and class methods are not supported in the expressions (operator[] being notable exception). It means that you cannot render elements in std::unordered_set or use std::find. In our samples, std::vector and arrays are used, and elements are accessed by indices. We wonder how bad it is.
4. It usually takes from 0.5 to 2 seconds to redraw a graph, and this speed is far from perfect.

If you're interested in this tool, you can try it and leave any comments under this post. We would like to hear how useful this tool in general, and how we can improve it. If you found a bug, please report an issue on GitHub or here in the comments. If you would like to add your own config sample, please add it here and make a pull request or post your screenshots in the comment section below.

#### History

Revisions

Rev. Lang. By When Δ Comment
en12 yeputons 2019-05-21 20:26:57 159 Update order of pictures and add [cut]
en11 yeputons 2019-05-21 20:17:24 79 Change home page from GitHub to Visual Studio Marketplace
en10 yeputons 2019-05-21 10:52:31 4 Tiny change: 'as development by a stud' -> 'as developed by a stud'
en9 yeputons 2019-05-20 23:06:53 0 (published)
en8 yeputons 2019-05-19 23:05:12 2 Tiny change: 'dd3.png)\n\n![ ](/pr' -> 'dd3.png)\n![ ](/pr'
en7 yeputons 2019-05-19 23:03:42 150
en6 yeputons 2019-05-19 23:03:19 75
en5 yeputons 2019-05-19 23:03:03 75
en4 yeputons 2019-05-19 23:02:33 75
en3 yeputons 2019-05-19 22:58:45 39
en2 yeputons 2019-05-19 22:48:04 2 Tiny change: ' issues:\n1. Somet' -> ' issues:\n\n1. Somet'
en1 yeputons 2019-05-19 22:47:47 2561 Initial revision (saved to drafts)


text:
# All credits to Adnan for coming up with this challenge.

My last challenge, before I go on break.

Given positive integer n, if n is odd, repeat / that many times; if n is even, repeat \ that many times.

(Seriously, the testcases would be much clearer than this description, so just look at the testcases.)

# Testcases

n output
1 /
2 \\
3 ///
4 \\\\
5 /////
6 \\\\\\

# Javascript, 22 bytes

n=>"\\/"[n%2].repeat(n)

Defines an anonymous function.

If only * repeated strings in Javascript. sighs

• Finally you have found the right operator – Leaky Nun Aug 30 '16 at 23:21
• @LeakyNun What are you talking about? – DanTheMan Aug 30 '16 at 23:22
• You were using the ternary operator to choose the character, no? – Leaky Nun Aug 30 '16 at 23:22
• @LeakyNun Initially, yes, but if you look at chat, I also posted this about a minute later. – DanTheMan Aug 30 '16 at 23:23
• @Jordumus You could either assign the function to a variable: f=n=>..., you could directly call it: (n=>...)(5). (Or if you are using the Node.js REPL, then you could use this._, which stands for the last thing entered) – DanTheMan Sep 1 '16 at 14:22

## Python, 20 bytes

lambda n:'\/'[n%2]*n

• Great, simple and elegant ^_^ – ABcDexter Sep 2 '16 at 13:19

# 05AB1E/2sable, 15119 8 bytes

DÈ„/\sè×

-2 bytes thanks to Leaky Nun

-1 byte thanks to Emigna

• ftfy – Leaky Nun Aug 31 '16 at 0:21
• It says sè× 😮 – DanTheMan Aug 31 '16 at 4:56
• "/\" can be „/\ – Emigna Aug 31 '16 at 7:06

# Perl, 20 bytes

Includes +1 for -p

Run with input on STDIN:

squigly.pl <<< 6

squigly.pl

#!/usr/bin/perl -p
T/\\^(..)+$ Try it online (First line added to allow multiple testcases to be run). # C#, 42 bytes string f(int n)=>new string("\\/"[n%2],n);  Selects the correct character, then creates a new string consisting of that character repeated n times. # PHP, 38 bytes for(;$i++<$a=$argv[1];)echo'\/'[$a%2];  (variant 38 bytes) while($i++<$a=$argv[1])echo'\/'[$a%2];  (variant 38 bytes) <?=str_pad('',$a=$argv[1],'\/'[$a%2]);

(variant 40 bytes)

<?=str_repeat('\/'[($a=$argv[1])%2],$a);  # C, 40 bytes i;f(n){for(i=n;i--;)putchar(n%2?47:92);}  Try it on Ideone • putchar(92-n%2*45) is the same length. – mbomb007 Sep 2 '16 at 13:46 # J, 10 bytes #'\/'{~2|]  This is a six-train verb, consisting of: # ('\/' {~ 2 | ])  This is a hook between # and ('\/' {~ 2 | ]); a hook (f g) y expands to y f (g y), so this expands to y # (... y), which, for single-characters, yields a list of y characters. The second part is a 5-train, consisting of: '\/' {~ 2 | ]  This evaluates to two forks: '\/' {~ (2 | ])  The inner fork, 2 | ], is modulus two. The outer fork, therefore, is: '\/' {~ mod2  Which takes ({~) the mod2 index (mod2) from the string /. Then, using the hook from above: y # (apt char)  This yields what we want, and we are done. ## Haskell, 25 bytes f n=cycle"\\/"!!n<$[1..n]

-1 byte thanks to Damien with cycle.

• f n=cycle"\\/"!!n<$[1..n] – Damien Aug 31 '16 at 6:20 • @Damien Wow, how did I forget cycle. – xnor Aug 31 '16 at 6:22 • I don't know. But I'm glad to have had the opportunity to "beat" you once :) – Damien Aug 31 '16 at 6:31 # Mathematica, 3432 28 bytes If[OddQ@#,"/","\\"]~Table~#&  Anonymous function. Takes an integer as input and returns a list of characters as output. • You can use ~Table~#. – Martin Ender Aug 31 '16 at 6:37 • I think it was added in 10.2. – Martin Ender Aug 31 '16 at 10:09 • Also, I think you can ditch the <>"" and return a list of characters. – Martin Ender Aug 31 '16 at 10:11 • @MartinEnder They must have also added ~Do~Infinity and such in 10.2+ as well... – LegionMammal978 Aug 31 '16 at 11:35 # Jelly, 5 bytes ị⁾/\x  ị⁾/\x ị⁾/\ modular-indexing into the string "/\" x repeat  # Powershell, 30 27 bytes Update: param($n)('\','/')[$n%2]*$n

Switching to param, thanks to timmyd.

"$("\/"[$args[0]%2])"*$args[0]  or slightly more readable ("\","/")[$args[0]%2]*$args[0]  Test: > 1..10 | % { ./run.ps1$_ }
/
\\
///
\\\\
/////
\\\\\\
///////
\\\\\\\\
/////////
\\\\\\\\\\

• Welcome to PPCG! Nice to see another PowerShell user around here. You can shave a few bytes by taking input as param($n) instead of $args, like follows for 27 bytes -- param($n)('\','/')[$n%2]*$n – AdmBorkBork Aug 31 '16 at 12:29 # Mathematica, 29 bytes "\\"["/"][[#~Mod~2]]~Table~#&  Cruelly exploits the fact that [[1]] returns the first argument of a function while [[0]] returns the function (head) itself, applied to the strangely valid function named "\\" which is being "evaluated" at "/". • It's slightly less weird when you consider that something of the form a[b] is just a generic expression with head a (index 0) and element b (index 1), and functions are just special kinds of expression (actually, it would be more correct to say that functions aren't expressions at all, but are simply rules for transforming expressions which usually have form f[x...]). :) – Martin Ender Aug 31 '16 at 10:16 • I've seen many languages abused on this site, but I think this is the first abuse of Mathematica that I've seen. Good job! – DanTheMan Aug 31 '16 at 13:43 # Ruby, 15 bytes ->n{'\/'[n%2]*n}  See it on eval.in: https://eval.in/632030 # Fourier, 27 bytes 92~SI~N%2{1}{47~S}N(Sai^~i)  Try it online! # Brachylog, 15 bytes :2%:"\/"rm:?jbw  Try it online! ### Explanation :2% Input mod 2… :"\/"rm …is the index of the element in string "\/",… :?j …element that we juxtapose Input times to itself… bw …and print to STDOUT after removing one slash/backslash  # CJam, 9 bytes ri_"\/"=*  Try it online! ### Explanation ri e# Read input and convert to integer N. _ e# Duplicate N. "\/"= e# Use N as cyclic index into "\/", giving '\ for even and '/ for odd inputs. * e# Repeat N times.  # ><> (Fish), 30 Bytes :2%?'/'o1-:?!;30. 30. >'\'50p  First time using this language, but I think I at least saved a little room by conditionally using the / as either part of the output or a mirror to redirect flow. Probably still horribly inefficient though, I feel like it could probably be cut down a little more at the very least. Input is the initial stack, output is stdout Try it online! • Welcome to Programming Puzzles & Code Golf! – Dennis Sep 1 '16 at 3:22 • @Dennis Thanks! I appreciate the welcome. – Callum Kerr Sep 1 '16 at 4:28 # Dyalog APL, 11 bytes Requires ⎕IO←0 which is default on many systems. ⊢⍴'\/'⊃⍨2|⊢  ⊢ the argument ⍴ reshapes (repeats) '\/'⊃⍨ the string "/" selected by 2|⊢ the division remainder when the argument is divided by two TryAPL online! • Cool! Very similar to J. – Conor O'Brien Aug 31 '16 at 0:04 • @ConorO'Brien Yes, the only difference is that 2-trains in J are hooks, while they are atops in Dyalog, so an explicit left tine is needed. – Adám Aug 31 '16 at 0:13 • Ah, I was wondering why the argument was there. – Conor O'Brien Aug 31 '16 at 0:31 • Finally an APL answer with all characters rendered correctly for me! – Cyoce Aug 31 '16 at 15:21 • @Cyoce Yeah, I wish we could specify (and embed) fonts on SE. – Adám Aug 31 '16 at 15:44 # Java 7, 68 65 bytes void c(int i){for(int x=0;x++<i;)System.out.print(i%2<1?92:'/');}  3 bytes saved thanks to @user902383 and @SeanBean. Just like with this answer, the shortest code-golf seems to loop and print. Both recursive and void c(int i){System.out.print(new String(new char[i]).replace("\0",i%2<1?"\\":"/"));} seems to be longer. Ungolfed & test code: Try it here. class M{ static void c(int i){ for(int x = 0; x++ < i;){ System.out.print(i % 2 < 1 ? 92 : '/'); } } public static void main(String[] a){ for(int i = 0; i < 10; i++){ c(i); System.out.println(); } } }  Output: / \\ /// \\\\ ///// \\\\\\ /////// \\\\\\\\ /////////  • Hi Kevin. Why not a Lambda Expression? – Vale Aug 31 '16 at 8:45 • @Vale Hi Vale. Because I'm an old-fashion Java 7 programmer. :) If you have a Java 8 or 9 answer that is slightly different than my answer, feel free to post it. – Kevin Cruijssen Aug 31 '16 at 8:58 • @Vale (he's odd like that :P) – Shaun Wild Aug 31 '16 at 9:24 • i think if you change x=-1;++x<i to x=0;x++<i you can reduce by one byte – user902383 Aug 31 '16 at 10:00 • Also you can replace "\\" : "/" with 92:'/' ;) – Shaun Wild Aug 31 '16 at 10:24 # R, 47 46 bytes n=scan();cat(rep(c("\\","/")[n%%2+1],n),sep="")  In R, you have to escape backslashes. the argument sep also has to be fully specified since it comes after .... Thus annoyingly few opportunities to save chars :( Thanks to bouncyball for golfing away a byte. • Save one byte by using indexing: n=scan();cat(rep(c('\\','/')[n%%2+1],n),sep='') – bouncyball Aug 31 '16 at 20:54 # T-SQL 50 bytes Of course no STDIN here, so let's assume a hardcoded INT variable like this: DECLARE @ INT then the solution is: PRINT IIF(@%2=0,REPLICATE('\',@),REPLICATE('/',@))  ## Pip, 8 bytes "\/"@aXa  Straightforward. Uses modular indexing to select the character and string repetition to multiply it. Try it online! This question presents an interesting comparison between Pip, Pyth, and Jelly, the latter two each having scored 5 bytes. All three languages have implicit output, with single-char operators for modular indexing and string repetition, and no requirement to escape backslashes in strings. There are two key differences, though: 1. Under certain circumstances, Pyth and Jelly need only one delimiter to define a string; 2. Pyth and Jelly have syntax such that the input doesn't need to be explicitly represented in the code (though for very different reasons, as Maltysen explained to me). Neither one of these features is likely to show up in Pip1 (I don't like the aesthetics of unbalanced delimiters, and point-free syntax or implicit operands seem like they would be too alien to my infix expression parser), but I'm okay with playing third fiddle. Even though "readability" is extremely relative when golfing, I'd argue that those three extra bytes make the Pip program a lot easier to understand at a glance--and in my book, that's a worthwhile tradeoff. 1 Although, single-character strings in Pip use a single ' delimiter, inspired by CJam and by quoting in Lisp. • I'm not sure that readability is a plus, in code golf? Not at the cost of bytes ! – GreenAsJade Aug 31 '16 at 11:02 • @GreenAsJade I expect a lot of people feel the same. I would just make one distinction: code golf != golflang design. Now you may well argue that the same principle (shorter is always better) applies to language design too. I'm just saying that for me, usability and even aesthetics are considerations. – DLosc Aug 31 '16 at 15:59 • Pro tip for making a golfing language: don't use infix – Cyoce Aug 31 '16 at 22:50 • – DLosc Sep 1 '16 at 0:52 • pyth doesn't have implicit point free syntax. it works pretty much the same way it does in python, making it readable yet short. your comment about the unbalanced delimiters on the other hand is pretty true – Maltysen Sep 2 '16 at 4:26 # Pyth, 5 bytes *@"\/  Test suite. Modular-indexing into the string \/ and then repeat. • You're FGITW'ing your own challenge? – xnor Aug 30 '16 at 23:44 • @xnor it isn't exactly my challenge. – Leaky Nun Aug 30 '16 at 23:49 # Perl 6, 16 bytes {<\ />[$_%2]x$_}  ## Usage: for 1..6 { say$_, {<\ />[$_%2]x$_}( $_ ) }  1/ 2\\ 3/// 4\\\\ 5///// 6\\\\\\  # Julia, 20 bytes !x="$("/\\"[x%2])"^x

# SpecBAS - 28 bytes

1 INPUT n: ?"\/"(ODD(n)+1)*n

ODD returns 1 if number is odd, then uses that as an index to print the correct character n number of times. Have to add 1 as SpecBAS strings start at character 1.

# Java 8, 56 bytes

(i,j)->{for(j=i;j-->0;)System.out.print(i%2<1?92:'/');};

I'd like to thank @Kevin Cruijssen in advanced for golfing my answer further.

# Ungolfed Test Program

public static void main(String[] args) {
BiConsumer<Integer, Integer> consumer = (i, j) -> {
for (j = i; j-- > 0;) {
System.out.print(i % 2 < 1 ? 92 : '/');
}
};

consumer.accept(5, 0);
consumer.accept(1, 0);
consumer.accept(8, 0);
}

# Actually, 10 bytes

Golfing suggestions welcome. Try it online!

;'\'/2(%I*

How it works

       Implicit input of n
;      Duplicate n
'\'/   The strings "/" and "\"
2(%    n mod 2
I      If n mod 2, then "/", else "\"
*      Multiply by n. Implicit print at the end.
`


text:
Browse Questions

# If $m_1,m_2,m_3$ and $m_4$ respectively denote the moduli of the complex numbers $1+4 i,3+i,1-i,$ and $2-3i,$ then the correct one, among the following is

$\begin {array} {1 1} (1)\;m_1 < m_2 < m_3 < m_4 & \quad (2)\;m_4 < m_3 < m_2 < m_1 \\ (3)\;m_3 < m_2 < m_4 < m_1 & \quad (4)\;m_3 < m_1 < m_2 < m_4 \end {array}$

$(2)\;m_4 < m_3 < m_2 < m_1$


text:
other querymodes : Identifierquery Coordinatequery Criteriaquery Referencequery Basicquery Scriptsubmission TAP Outputoptions Help

2015MNRAS.454L..41B - Mon. Not. R. Astron. Soc., 454, L41-L45 (2015/November-3)

Formation of emission line dots and extremely metal-deficient dwarfs from almost dark galaxies.

BEKKI K.

Abstract (from CDS):

Recent observations have discovered a number of extremely gas-rich very faint dwarf galaxies possibly embedded in low-mass dark matter haloes. We investigate star formation histories of these gas-rich dwarf (almost dark') galaxies both for isolated and interacting/merging cases. We find that although star formation rates (SFRs) are very low (<10-5M/yr) in the simulated dwarfs in isolation for the total halo masses (Mh) of 108-109M, they can be dramatically increased to be ∼ 10–4 M/yr when they interact or merge with other dwarfs. These interacting faint dwarfs with central compact H II regions can be identified as isolated emission line dots (ELdots') owing to their very low surface brightness envelopes of old stars. The remnant of these interacting and merging dwarfs can finally develop central compact stellar systems with very low metallicities (Z/Z < 0.1), which can be identified as extremely metal-deficient (`XMD') dwarfs. These results imply that although there would exist many faint dwarfs that can be hardly detected in the current optical observations, they can be detected as isolated ELdots or XMD dwarfs, when they interact with other galaxies and their host environments. We predict that nucleated ultrafaint dwarfs formed from the darkest dwarf merging can be identified as low-mass globular clusters owing to the very low surface brightness stellar envelopes.


text:
# zbMATH — the first resource for mathematics

The structure of extremals of a class of second order variational problems. (English) Zbl 0989.49003
Summary: We study the structure of extremals of a class of second-order variational problems without convexity, on intervals in $$R_+$$. The problems are related to a model in thermodynamics introduced in [B. D. Coleman, M. Marcus and V. J. Mizel, Arch. Ration. Mech. Anal. 117, No. 4, 321-347 (1992; Zbl 0788.73015)]. We are interested in properties of the extremals which are independent of the length of the interval, for all sufficiently large intervals. As in [M. Marcus, Arch. Ration. Mech. Anal. 124, No. 1, 67-98 (1993; Zbl 0793.49019); Calc. Var. Partial Differ. Equ. 6, No. 2, 123-142 (1998; Zbl 0897.49010)] the study of these properties is based on the relation between the variational problem on bounded, large intervals and a limiting problem on $$R_+$$. Our investigation employs techniques developed in [A. Leizarowitz and V. J. Mizel, Arch. Ration. Mech. Anal. 106, No. 2, 161-193 (1989; Zbl 0672.73010)]and [M. Marcus (loc. cit.)] along with turnpike techniques developed in [A. J. Zaslavski, J. Math. Anal. Appl. 194, No. 3, 660-696 (1995; Zbl 0860.49001); ibid. 198, No. 3, 893-921 (1996; Zbl 0881.49001)].

##### MSC:
 49J10 Existence theories for free problems in two or more independent variables 49J45 Methods involving semicontinuity and convergence; relaxation 49S05 Variational principles of physics (should also be assigned at least one other classification number in Section 49-XX)
Full Text:
##### References:
 [1] Adams, R.A., Sobolev spaces, (1975), Academic Press New York · Zbl 0186.19101 [2] Aubin, J.P.; Ekeland, I., Applied nonlinear analysis, (1984), Wiley-Interscience New York [3] Berkovitz, L.D., Lower semicontinuity of integral functionals, Trans. amer. math. soc., Vol. 192, 51-57, (1974) · Zbl 0294.49001 [4] Carlson, D.A., The existence of catching-up optimal solutions for a class of infinite horizon optimal control problems with time delay, SIAM journal on control and optimization, Vol. 28, 402-422, (1990) · Zbl 0692.49009 [5] Carlson, D.A.; Jabrane, A.; Haurie, A., Existence of overtaking solutions to infinite dimensional control problems on unbounded time intervals, SIAM journal on control and optimization, Vol. 25, 1517-1541, (1987) · Zbl 0658.49003 [6] Carlson, D.A.; Haurie, A.; Leizarowitz, A., Infinite horizon optimal control, (1991), Springer-Verlag Berlin · Zbl 0758.49001 [7] Coleman, B.D.; Marcus, M.; Mizel, V.J., On the thermodynamics of periodic phases, Arch. rational mech. anal., Vol. 117, 321-347, (1992) · Zbl 0788.73015 [8] Kelley, J.L., General topology, (1955), Van Nostrand Princeton, NJ · Zbl 0066.16604 [9] Leizarowitz, A., Infinite horizon autonomous systems with unbounded cost, Appl. math. optim., Vol. 13, 19-43, (1985) · Zbl 0591.93039 [10] Leizarowitz, A.; Mizel, V.J., One dimensional infinite horizon variational problems arising in continuum mechanics, Arch. rational mech. anal., Vol. 106, 161-194, (1989) · Zbl 0672.73010 [11] Makarov, V.L.; Rubinov, A.M., Mathematical theory of econimic dynamics and equilibria, (1977), Springer-Verlag New York · Zbl 0352.90018 [12] Marcus, M., Uniform estimates for a variational problem with small parameters, Arch. rational mech. anal., Vol. 124, 67-98, (1993) · Zbl 0793.49019 [13] \scM. Marcus, Universal properties of stable states of a free energy model with small parameters, Cal. Var. , to appear. · Zbl 0897.49010 [14] Mizel, V.J.; Peletier, L.A.; Troy, W.C., Periodic phases in second order materials, (1997), Preprint · Zbl 0931.74006 [15] Zaslavski, A.J., The existence of periodic minimal energy configurations for one-dimensional infinite horizon variational problems arising, in continuum mechanics, J. math. anal. appl., Vol. 194, 459-476, (1995) · Zbl 0869.49003 [16] Zaslavski, A.J., The existence and structure of extremals for a class of second order infinite horizon variational problems, J. math. anal. appl., Vol. 194, 660-696, (1995) · Zbl 0860.49001 [17] Zaslavski, A.J., Structure of extremals for one-dimensional variational problems arising in continuum mechanics, J. math. anal. appl., Vol. 198, 893-921, (1996) · Zbl 0881.49001 [18] Zaslavski, A.J., The asymptotic turnpike property and the uniqueness of a periodic minimal solution for one-dimensional variational problems, (1996), Preprint
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:
# Eilenberg–Zilber theorem

In mathematics, specifically in algebraic topology, the Eilenberg–Zilber theorem is an important result in establishing the link between the homology groups of a product space $X \times Y$ and those of the spaces $X$ and $Y$. The theorem first appeared in a 1953 paper in the American Journal of Mathematics.

## Statement of the theorem

The theorem can be formulated as follows. Suppose $X$ and $Y$ are topological spaces, Then we have the three chain complexes $C_*(X)$, $C_*(Y)$, and $C_*(X \times Y)$. (The argument applies equally to the simplicial or singular chain complexes.) We also have the tensor product complex $C_*(X) \otimes C_*(Y)$, whose differential is, by definition,

$\delta( \sigma \otimes \tau) = \delta_X \sigma \otimes \tau + (-1)^p \sigma \otimes \delta_Y \tau$

for $\sigma \in C_p(X)$ and $\delta_X$, $\delta_Y$ the differentials on $C_*(X)$,$C_*(Y)$.

Then the theorem says that we have chain maps

$F: C_*(X \times Y) \rightarrow C_*(X) \otimes C_*(Y), \quad G: C_*(X) \otimes C_*(Y) \rightarrow C_*(X \times Y)$

such that $FG$ is the identity and $GF$ is chain-homotopic to the identity. Moreover, the maps are natural in $X$ and $Y$. Consequently the two complexes must have the same homology:

$H_*(C_*(X \times Y)) \cong H_*(C_*(X) \otimes C_*(Y)).$

An important generalisation to the non-abelian case using crossed complexes is given in the paper by Tonks below. This give full details of a result on the (simplicial) classifying space of a crossed complex stated but not proved in the paper by Brown and Higgins on classifying spaces.

## Consequences

The Eilenberg–Zilber theorem is a key ingredient in establishing the Künneth theorem, which expresses the homology groups $H_*(X \times Y)$ in terms of $H_*(X)$ and $H_*(Y)$. In light of the Eilenberg–Zilber theorem, the content of the Künneth theorem consists in analysing how the homology of the tensor product complex relates to the homologies of the factors; the answer is somewhat subtle.

## References

• Eilenberg, Samuel; Zilber, J. A. (1953), "On Products of Complexes", Amer. Jour. Math. (American Journal of Mathematics, Vol. 75, No. 1) 75 (1): 200–204, doi:10.2307/2372629, JSTOR 2372629, MR 52767.
• Hatcher, Allen (2002), Algebraic Topology, Cambridge University Press, ISBN 0-521-79540-0.
• Tonks, Andrew (2003), "On the Eilenberg-Zilber theorem for crossed complexes", Jour. Pure Applied Algebra 179: 199–230.
• Brown, Ronald; Higgins, Philip J. (1991), "The classifying space of a crossed complex", Proc. Camb. Phil. Soc. 110: 95–120, doi:10.1017/S0305004100070158.


text:
# Changing Pipe Properties

## Preamble¶

In [2]:
from plotapi import Terminus

## Introduction¶

The Terminus pipes can be modified to improve the presentation of our diagram, giving us control over the spacing and slope positions.

As we can see, we have set our license details in the preamble with Terminus.set_license().

## Dataset¶

Terminus expects a list of dictionary items, these will define the flow of pixels between a source and a target.

In [3]:
links = [
{"source":"England", "target":"Germany", "value": 1000},
{"source":"England", "target":"France", "value": 3000},
{"source":"England", "target":"Spain", "value": 5000},
{"source":"England", "target":"Italy", "value": 4000},
{"source":"England", "target":"Japan", "value": 800},

{"source":"Ireland", "target":"Germany", "value": 3500},
{"source":"Ireland", "target":"France", "value": 3750},
{"source":"Ireland", "target":"Spain", "value": 1750},
{"source":"Ireland", "target":"Italy", "value": 5000},
{"source":"Ireland", "target":"Japan", "value": 400},
]

We can add many source's and target's! As they increase, we may need to adjust Terminus layout properties to accomodate the diagram's size and throughput.

## Visualisation¶

There are many opportunities to customise the Terminus pipes.

• slope_start, to change the point at which the pipe starts transitioning from its source $x$ (or $y$) position to its target $x$ (or $y$) position. Whether it's $x$ or $y$ depends on whether it's a vertical Terminus diagram or not. This value must be a float between or equal to $0.0$ and $1.0$.
• slope_end, similar to the above, but for when the sope ends.
• target_spacing_ratio, to specify how much of the arrangement should be whitespace versus how much should be taken up by pipe thickness. This value must be a float between or equal to $0.0$ and $1.0$.

Let's try a few combinations.

Here we're using .show() which outputs to a Jupyter Notebook cell, however, we may want to output to an HTML file with .to_html() instead. More on the different output methods later!

In [8]:
Terminus(links, show_stats=False, slope_start=0.1, slope_end=0.9).show()

Plotapi - Terminus Diagram
In [10]:
Terminus(links, show_stats=False, slope_start=0.45, slope_end=0.55).show_png()

In [9]:
Terminus(links, show_stats=False, pipe_spacing_ratio=0.8).show_png()

You can do so much more than what's presented in this example, and this is covered in other sections. If you want to see the full list of growing features, check out the Plotapi API Documentation.

# Changing Stats Properties

## Preamble¶

In [2]:
from plotapi import Terminus

## Introduction¶

The stats panel that appears in a default Terminus diagram can be adjusted or hidden entirely. This gives us even more control over the presentation of our Terminus diagram.

As we can see, we have set our license details in the preamble with Terminus.set_license().

## Dataset¶

Terminus expects a list of dictionary items, these will define the flow of pixels between a source and a target.

In [3]:
links = [
{"source":"England", "target":"Germany", "value": 1000},
{"source":"England", "target":"France", "value": 3000},
{"source":"England", "target":"Spain", "value": 5000},
{"source":"England", "target":"Italy", "value": 4000},
{"source":"England", "target":"Japan", "value": 800},

{"source":"Ireland", "target":"Germany", "value": 3500},
{"source":"Ireland", "target":"France", "value": 3750},
{"source":"Ireland", "target":"Spain", "value": 1750},
{"source":"Ireland", "target":"Italy", "value": 5000},
{"source":"Ireland", "target":"Japan", "value": 400},
]

We can add many source's and target's! As they increase, we may need to adjust Terminus layout properties to accomodate the diagram's size and throughput.

## Visualisation¶

There are many opportunities to customise the Terminus stats panel.

• show_stats, to show or hide the stats panel.
• stats_text_width, to adjust the width of each stats column.
• show_stats_title, to hide or show the stats titles.

Let's try a few combinations.

Here we're using .show() which outputs to a Jupyter Notebook cell, however, we may want to output to an HTML file with .to_html() instead. More on the different output methods later!

In [4]:
Terminus(links, show_stats=False).show()

Plotapi - Terminus Diagram
In [5]:
Terminus(links, show_stats_title=False).show_png()

In [6]:
Terminus(links, stats_text_width=150).show_png()

You can do so much more than what's presented in this example, and this is covered in other sections. If you want to see the full list of growing features, check out the Plotapi API Documentation.

# Changing Bar Properties

## Preamble¶

In [ ]:
from plotapi import Terminus

## Introduction¶

The bars that appear at each terminus can be modified or hidden entirely. This gives us even more control over the presentation of our Terminus diagram.

As we can see, we have set our license details in the preamble with Terminus.set_license().

## Dataset¶

Terminus expects a list of dictionary items, these will define the flow of pixels between a source and a target.

In [ ]:
links = [
{"source":"England", "target":"Germany", "value": 1000},
{"source":"England", "target":"France", "value": 3000},
{"source":"England", "target":"Spain", "value": 5000},
{"source":"England", "target":"Italy", "value": 4000},
{"source":"England", "target":"Japan", "value": 800},

{"source":"Ireland", "target":"Germany", "value": 3500},
{"source":"Ireland", "target":"France", "value": 3750},
{"source":"Ireland", "target":"Spain", "value": 1750},
{"source":"Ireland", "target":"Italy", "value": 5000},
{"source":"Ireland", "target":"Japan", "value": 400},
]

We can add many source's and target's! As they increase, we may need to adjust Terminus layout properties to accomodate the diagram's size and throughput.

## Visualisation¶

There are many opportunities to customise the Terminus bars.

• show_bars, to hide or show them.
• outer_bars, to place the bars inside or outside a terminus.
• bar_width, to set the maximum width of the bars.
• colored_target_bars, to enable or disable coloured target bars. By default, they are all black.

Let's try a few combinations.

Here we're using .show() which outputs to a Jupyter Notebook cell, however, we may want to output to an HTML file with .to_html() instead. More on the different output methods later!

In [3]:
Terminus(links, height=400, outer_bars=True, bar_width=150, colored_target_bars=True).show()

Plotapi - Terminus Diagram
In [4]:
Terminus(links, height=400, show_bars=False).show_png()

You can do so much more than what's presented in this example, and this is covered in other sections. If you want to see the full list of growing features, check out the Plotapi API Documentation.

# Changing Pipe Colours

## Preamble¶

In [2]:
from plotapi import Terminus

## Introduction¶

The pipe_color and pipe_opacity can be changed to improve the presentation of our Terminus diagram.

As we can see, we have set our license details in the preamble with Terminus.set_license().

## Dataset¶

Terminus expects a list of dictionary items, these will define the flow of pixels between a source and a target.

In [3]:
links = [
{"source":"England", "target":"Germany", "value": 1000},
{"source":"England", "target":"France", "value": 3000},
{"source":"England", "target":"Spain", "value": 5000},
{"source":"England", "target":"Italy", "value": 4000},
{"source":"England", "target":"Japan", "value": 800},

{"source":"Ireland", "target":"Germany", "value": 3500},
{"source":"Ireland", "target":"France", "value": 3750},
{"source":"Ireland", "target":"Spain", "value": 1750},
{"source":"Ireland", "target":"Italy", "value": 5000},
{"source":"Ireland", "target":"Japan", "value": 400},
]

We can add many source's and target's! As they increase, we may need to adjust Terminus layout properties to accomodate the diagram's size and throughput.

## Visualisation¶

The pipe_opacity must be a float between or equal to $0.0$ and $1.0$.

The pipe_color must be a colour expressed as a string, e.g. a HEX color code.

Let's try a few combinations.

Here we're using .show() which outputs to a Jupyter Notebook cell, however, we may want to output to an HTML file with .to_html() instead. More on the different output methods later!

In [35]:
Terminus(links, pipe_color="#FFFF00", pipe_opacity=0.1).show()

Plotapi - Terminus Diagram
In [36]:
Terminus(links, pipe_color="#000000", pipe_opacity=1).show_png()

In [40]:
Terminus(links, pipe_color="cyan", pipe_opacity=0.1).show_png()

You can do so much more than what's presented in this example, and this is covered in other sections. If you want to see the full list of growing features, check out the Plotapi API Documentation.

# Different Pipe Alignment

## Preamble¶

In [1]:
from plotapi import Terminus

## Introduction¶

Pipes are aligned to the top-left by default, however, changing their alignment with pipe_alignment can often significantly improve the presentation of a Terminus diagram. The pipe_alignment works regardless of the vertical or bundled settings.

As we can see, we have set our license details in the preamble with Terminus.set_license().

## Dataset¶

Terminus expects a list of dictionary items, these will define the flow of pixels between a source and a target.

In [2]:
links = [
{"source":"England", "target":"Germany", "value": 1000},
{"source":"England", "target":"France", "value": 3000},
{"source":"England", "target":"Spain", "value": 5000},
{"source":"England", "target":"Italy", "value": 4000},
{"source":"England", "target":"Japan", "value": 800},

{"source":"Ireland", "target":"Germany", "value": 3500},
{"source":"Ireland", "target":"France", "value": 3750},
{"source":"Ireland", "target":"Spain", "value": 1750},
{"source":"Ireland", "target":"Italy", "value": 5000},
{"source":"Ireland", "target":"Japan", "value": 400},
]

We can add many source's and target's! As they increase, we may need to adjust Terminus layout properties to accomodate the diagram's size and throughput.

## Visualisation¶

The options available for pipe_alignment are: top, bottom, justify, and camel.

Let's demonstrate pipe_alignment=camel on a vertical Terminus diagram first, and then illustrate a few different configurations as PNGs.

Here we're using .show() which outputs to a Jupyter Notebook cell, however, we may want to output to an HTML file with .to_html() instead. More on the different output methods later!

In [3]:
Terminus(links, vertical=True, width=500, height=600, pipe_alignment="camel").show()

Plotapi - Terminus Diagram
In [9]:
Terminus(links, vertical=True, width=500, height=600, pipe_alignment="bottom").show_png()