text:
# Is this number a repdigit?

## Challenge

A repdigit is a non-negative integer whose digits are all equal.

Create a function or complete program that takes a single integer as input and outputs a truthy value if the input number is a repdigit in base 10 and falsy value otherwise.

The input is guaranteed to be a positive integer.

You may take and use input as a string representation in base 10 with impunity.

## Test cases

These are all repdigits below 1000.

1
2
3
4
5
6
7
8
9
11
22
33
44
55
66
77
88
99
111
222
333
444
555
666
777
888
999

A larger list can be found on OEIS.

## Winning

The shortest code in bytes wins. That is not to say that clever answers in verbose languages will not be welcome.

• – Leaky Nun Jun 8 '17 at 3:02
• @AidanF.Pierce What's the biggest number the input will be? – stevefestl Jun 14 '17 at 9:00

# Brachylog, 1 byte

=

Try it online!

This acts on integers.

brachylog_equal('integer':0, 'integer':0, 'integer':0).
brachylog_equal('integer':0, 'integer':I, 'integer':I) :-
H #\= 0,
integer_value('integer':_:[H|T], I),
brachylog_equal('integer':0, [H|T], [H|T]).

• I've decided to accept this one because it's the earliest 1-byte submission. – praosylen Jun 25 '17 at 22:44

# C (gcc), 3330 29 bytes

f(n){n=n%100%11?9/n:f(n/10);}

Try it online!

• Very nice trick with the recursion and assignment instead of return (think I'm going to steal the latter for my answer :) ). – Doorknob Jun 8 '17 at 4:13
• @Doorknob Go ahead. :) You'll have to specify a compiler though; I expect this to be pretty much gcc/tcc only. – Dennis Jun 8 '17 at 4:22
• Did you know beforehand that gcc with -O0 will write final result to n from exactly eax, so as to make it the return value? Could you elaborate on the logic why you knew it would work? – Ruslan Jun 9 '17 at 11:11
• @Ruslan I'm not sure why gcc behaves like this, but the last variable assignment inside a function winds up in eax more often than not. If I had to guess, I'd say it's because it allows return n to be a nop, and there's no reason to assign to a local variable at the end of a function if you're not going to return the result. – Dennis Jun 9 '17 at 14:25

# COBOL, 139 BYTES

I feel like COBOL doesn't get any love in code golfing (probably because there is no way it could win) but here goes:

IF A = ALL '1' OR ALL '2' OR ALL '3' OR ALL '4' OR ALL '5' OR
ALL '6' OR ALL '7' OR ALL '8' OR ALL '9' DISPLAY "TRUE" ELSE
DISPLAY "FALSE".

A is defined as a PIC 9(4).

• You can golf this by changing TRUE and FALSE to 1 and 0 respectively – caird coinheringaahing Nov 4 '17 at 23:08

# 05AB1E, 1 byte

Ë

Checks if all digits are equal

Try it online!

# Python 3, 25, 24 19 bytes.

len({*input()})>1>t

A stdin => error code variant.

Returns error code 0 if it's a repdigit - or an error on failure.

Thanks to Dennis for helping me in the comments.

• Since exit code 0 indicates success, I think you should test >1 rather than <2. Raising an actual error would be shorter than using exit btw. – Dennis Jun 8 '17 at 5:14
• I was wondering about that. The challenge says "a truthy value". I'll change it to raise an error. – Shadow Jun 8 '17 at 5:15
• Yes, if python3 repdigit.py; then echo truthy; else echo falsy; fi has to work according to out definition, so 0 is truthy and everything else is falsy. – Dennis Jun 8 '17 at 5:17
• That makes sense. Ok I'll make that change too. – Shadow Jun 8 '17 at 5:18
• @Arc676 Unary * unpacks an iterable. For example, {*'123'} generates the set {'1','2','3'}. – Dennis Jun 14 '17 at 6:18

## Mathematica, 27 bytes

AtomQ@Log10[9#/#~Mod~10+1]&

It doesn't beat Equal@@IntegerDigits@#&, but it beats the other arithmetic-based Mathematica solution.

Repdigits are of the form n = d (10m-1) / 9 where m is the number of digits and d is the repeated digit. We can recover d from n by taking it modulo 10 (because if it's a rep digit, it's last digit will be d). So we can just rearrange this as m = log10(9 n / (n % 10) + 1) and check whether m is an integer.

# ///, 110 bytes

/11/1//22/2//33/3//44/4//55/5//66/6//77/7//88/8//99/9//1/.//2/.//3/.//4/.//5/.//6/.//7/.//8/.//9/.//T..///.//T

Try it online!

The /// language doesn't have any concept of truthy and falsey, so this outputs "T" if the input is a repdigit, and does not output any characters if the input is not a repdigit.

all=<<(==).head

Try it online! Takes string input.

Equivalent to \s->all(==head s)s. Narrowly beats out alternatives:

f s=all(==s!!0)s
f s=s==(s!!0<$s) f(h:t)=all(==h)t f(h:t)=(h<$t)==t
f s=(s<*s)==(s*>s)
f(h:t)=h:t==t++[h]

• f s=(s<*s)==(s*>s) is a very interesting idea, I wasn't aware of this behaviour of <*before. – Laikoni Jun 8 '17 at 8:35

## C (gcc), 41 bytes

f(char*s){s=!s[strspn(s,s+strlen(s)-1)];}

This is a function that takes input as a string and returns 1 if it is a repdigit and 0 otherwise.

It does this by making use of the strspn function, which takes two strings and returns the length of the longest prefix of the first string consisting of only characters from the second string. Here, the first string is the input, and the second string is the last digit of the input, obtained by passing a pointer to the last character of the input string.

Iff the input is a repdigit, then the result of the call to strspn will be strlen(s). Then, indexing into s will return a null byte if this is the case (str[strlen(str)] is always \0) or the first digit that doesn't match the last digit otherwise. Negating this with ! results in whether s represents a repdigit.

Try it online!

Thanks to @Dennis for indirectly reminding me of the assign-instead-of-return trick via his insanely impressive answer, saving 4 bytes!

• You can shorten this a bit further by avoiding strlen and creating a new string from *s: c;f(char*s){c=*s;c=!s[strspn(s,&c)];} for 37. – hvd Jun 8 '17 at 20:48

# Jelly, 2 1 byte

E

Try it online!

• Umm...do 1-9 count as repdigits? – Erik the Outgolfer Jun 8 '17 at 9:30
• According to the OP's answer, yes. Wolfram and OEIS agree. – Dennis Jun 8 '17 at 12:48

## PHP, 2528 25

<?=!chop($argn,$argn[0]);

remove all chars from the right that are equal to the first and print 1 if all chars were removed.

## R, 31 bytes

function(x)grepl("^(.)\\1*$",x)  This functions works with string inputs and uses a regular expression to determine whether the input is a repdigit. ### Example > f <- function(x)grepl("^(.)\\1*$",x)
> x <- c("1", "2", "11", "12", "100", "121", "333")
> f(x)
[1]  TRUE  TRUE  TRUE FALSE FALSE FALSE  TRUE

• 28 bytes by switching from function(x) to using scan(,'') tio.run/##K/r/P70otSBHQylOQ08zJsZQS0VJpzg5MU9DR11dU/O/paXlfwA – Sumner18 Dec 18 '18 at 17:57

# Octave, 11 bytes

@(s)s==s(1)

Try it online!

Takes the input as a string.

It checks all characters for equality with the first characters. If all are equal, the result will be a vector with only 1 (true in Octave), otherwise there will be at least one 0 (false in Octave). Here's a proof.

• Wouldn't you need to wrap it in all(...) to get a truthy/falsy value output? – Tom Carpenter Jun 8 '17 at 23:09
• Did you test the proof? That's piece of code is the definition (meta consensus) of true/false on ppcg. – Stewie Griffin Jun 9 '17 at 7:12

# grep, 17 bytes

grep -xP '(.)\1*'

Matches any string that's a repetition of its first character.

• I think this would be bash. – S.S. Anne Feb 19 '20 at 22:01
• In what way, @S.S.Anne? There's nothing in that command that isn't valid portable shell. – Toby Speight Feb 20 '20 at 8:44
• Well, any shell. I didn't mean specifically bash. – S.S. Anne Feb 20 '20 at 17:42

# C#, 4233 28 bytes

i=>i.Replace(i[0]+"","")==""

i has to be a string.

Shaved down a lot thanks to @LethalCoder

• i[0].ToString() can be shortened to i[0]+"", <1 is shorter than ==0. – TheLethalCoder Jun 8 '17 at 10:25
• Also .Length<1 can just be =="" – TheLethalCoder Jun 8 '17 at 12:21

## Regex (ECMAScript), 31 bytes

^(x{0,9})((x+)\3{8}(?=\3$)\1)*$

Try it online!

Takes input in unary, as usual for math regexes (note that the problem is trivial with decimal input: just ^(.)\1*$). Explanation: ^(x{0,9}) # \1 = candidate digit, N -= \1 ( # Loop the following: (x+)\3{8}(?=\3$)  # N /= 10 (fails and backtracks if N isn’t a multiple of 10)
\1                # N -= \1
)* $# End loop, assert N = 0  • Try it online! – Deadcode Feb 8 '19 at 19:08 • @Deadcode Whoops I forgot to put that in, thanks! – Grimmy Feb 9 '19 at 10:49 # Braingolf, 6 bytes iul1-n  Try it online! Unfortunately, Braingolf's implicit input from commandline args can't accept an all-digits input as a string, it will always cast it to a number, so instead the solution is to pass it via STDIN, which adds 1 byte for reading STDIN (i) ## Explanation: iul1-n i Read from STDIN as string, push each codepoint to stack u Remove duplicates from stack l Push length of stack 1- Subtract 1 n Boolean negate, replace each item on stack with 1 if it is a python falsey value replace each item on stack with 0 if it is a python truthy value Implicit output of last item on stack  After u, the length of the stack equals the number of unique characters in the input, subtracting 1 means it will be 0 if and only if there is exactly 1 unique character in the input, 0 is the only falsey number in Python, so n will replace 0 with 1, and everything else with 0. # Japt, 4 bytes ¥çUg  Try it online! ## JavaScript (ES6), 23 21 bytes Saved 2 bytes thanks to Neil Takes input as either an integer or a string. Returns a boolean. n=>/^(.)\1*$/.test(n)

### Demo

let f =

n=>/^(.)\1*$/.test(n) console.log(f(444)) console.log(f(12)) • Doesn't usingtest instead of !!exec save 2 bytes? – Neil Jun 8 '17 at 9:07 • (Although, for a string-only input, porting the PHP answer is even shorter.) – Neil Jun 8 '17 at 9:10 • @Neil I don't know what I was thinking. Thanks! – Arnauld Jun 8 '17 at 9:11 # Ohm, 4 bytes Ul2<  Try it online! ### Explanation  Ul2< U # Push uniquified input l # Length 2< # Is it smaller than 2?  • I think Ul≤should work. – Christoph Jun 8 '17 at 11:19 • @Christoph Yee I had that but I wasn't sure if 0 counts as a truthy value. (Quite new to this codegolf thing ^^) – Datboi Jun 8 '17 at 11:23 • Ah damn 0 is falsey and every other number is truthy. I just noticed that we need exactly the opposite for this challenge (often we're allowed to swap as long as we declare which case is truthy and which is falsey). Truthy is defined by "would take a brench". – Christoph Jun 8 '17 at 11:31 • Ul1E should also work (though I don't know Ohm) because it doesn't need to handle 0. – Esolanging Fruit Jun 14 '17 at 3:42 # APL, 5 bytes 2 bytes saved thanks to @KritixiLithos ⍕≡1⌽⍕  Try it online! • You can golf the 7-byte solution to 5 bytes by using a train ⊢≡1⌽⊢. – user41805 Jun 8 '17 at 11:15 • @KritixiLithos thanks! – Uriel Jun 8 '17 at 11:54 • Replace ⊢ with ⍕ to handle both strings and numbers. – Adám Jun 8 '17 at 12:27 • @Adám thanks! I didn't think of formatting as a way of getting array of digits. – Uriel Jun 8 '17 at 18:29 # Java, 21 bytes: l->l.toSet().size()<2  l is a MutableList<Character> from eclipse collections. • l could also be a CharAdapter. – Donald Raab Jun 13 '17 at 23:37 • @DonaldRaab oooh, I've never seen that class. Nice find. – Nathan Merrill Jun 14 '17 at 1:59 • There is CodePointAdapter and CodePointList as well. – Donald Raab Jun 17 '17 at 23:46 • @DonaldRaab I use eclipse collections quite a bit, but I always struggle to find anything outside of the standard List/Map/Set collections. Is your knowledge based off of development of the libraries, or is there somewhere (other than the javadoc) I can find a better reference for everything EC provides? – Nathan Merrill Jun 18 '17 at 2:14 • Glad to hear it. I am a committer for the framework... I wrote these particular String related classes a year or so ago. There is a Reference Guide which many folks don't know about. There is a mind-map I recently put together to help folks learn and navigate through the the plethora of features in the library. It's the last link in the TOC of the Ref. Guide. github.com/eclipse/eclipse-collections/blob/master/docs/… – Donald Raab Jun 18 '17 at 2:22 # Kotlin, 28 19 bytes {it.toSet().size<2}  Try it online! Takes input as a String because You may take and use input as a string representation in base 10 with impunity. ## Explanation { it.toSet() // create a Set (collection with only unique entries) // out of the characters of this string .size < 2 // not a repdigit if the set only has one entry }  If you don't like the fact it takes a String, you can have one that takes an Int for 24 bytes. {(""+it).toSet().size<2}  # PHP, 30 bytes <?=($a=$argn).$a[0]==$a[0].$a;

• @Dada No. It will compare 4344 and 4434. – user63956 Jun 8 '17 at 8:11
• Oh right, my bad. thanks – Dada Jun 8 '17 at 9:07

# Neim, 1 byte

𝐐

Simply checks that all elements are equal.

Without builtin, 2 bytes:

𝐮𝐥

Explanation:

𝐮     Calculate unique digits
𝐥    Get the length

This works because only 1 is considered truthy in Neim, and everything else is falsy.

Alternatively, for 4 bytes:

𝐮𝐣μ𝕃

Explanation:

𝐮      Calculate unique digits
𝐣      Join list into an integer
𝕃   Check that is is less than
μ    Ten.

Try it!

# C, 38 bytes

f(char*s){return*s^s[1]?!s[1]:f(s+1);}

Recursively walks a string. If the first two characters differ (*s^s[1]) then we succeed only if we're at the end of the string (!s[1]) otherwise we repeat the test at the next position (f(s+1)).

## Test program

#include <stdio.h>
int main(int argc, char **argv)
{
while (*++argv)
printf("%s: %s\n", *argv, f(*argv)?"yes":"no");
}

# Java, 3833 23 bytes

n->n.matches("(.)\\1*")

n is a String, naturally.

# R, 25 bytes

grepl("^(.)\\1*$",scan())  Try it online Best non-regex solution I could come up with was 36 bytes: is.na(unique(el(strsplit(x,"")))[2])  • for another option on the non-regex rle(charToRaw(scan(,'')))$v[2]<1 – MickyT Jun 8 '17 at 19:52

# Cubix, 15 bytes

uOn@ii?-?;.$@<_  Try it online!  u O n @ i i ? - ? ; .$
@ < _ . . . . .
. .
. .

Watch It Run

Outputs 1 for truthy and nothing for falsey

Very simply read reads in the input one character at a time. It takes the current character away from the previous. If a non zero result then it halts immediately. Otherwise it continues inputting and comparing until the EOI. On EOI (-1), negate and exit

# QBasic 4.5, 55 bytes

INPUT a
FOR x=1TO LEN(STR\$(a))
c=c*10+1
NEXT
?a MOD c=0

I've mathed it! The FOR-loop checks the number of digits in the input, then creates c, which is a series of 1's of length equal to the input. A number then is repdigit if it modulo the one-string == 0.

Try it online! Note that the online interpreter is a bit quirky and I had to write out a couple of statements that the DOS-based QBasic IDE would expand automatically.


text:
I realize I’ve been slow as of late.

Though the decomposition of the square-integrable 1-forms was a Hilbert space, $L^2$-decomposition, it reflects many smoothness properties in which we are interested.  The goal of this post is twofold: first, show that the smooth differentials in the first two components are respectively the exact and coexact ones; and second, show that the closedness of a square-integrable 1-form in some neighborhood  implies the smoothness of the corresponding $E$ term.  The ultimate goal is the existence theorems for harmonic functions on Riemann surfaces.

Smooth differentials in ${E, E^*}$

I now claim that any smooth differential ${\omega \in E}$ is exact and any smooth differential in ${E^*}$ is co-exact. This is nontrivial because of the way we took completions. I will only prove the claim for ${E}$.

We already have closedness of ${\omega}$ by the previous post. To show exactness, it will be sufficient to show that for any closed smooth curve ${c}$,

$\displaystyle \int_c \omega = 0$

because we could use a path integral to define the antiderivative. We can approximate ${c}$ by a simple closed curve homotopic to ${c}$, so we can assume at the outset that ${c}$ is a homeomorphism ${S^1 \rightarrow M}$

Proposition 1 Given ${c}$ as above, there is a closed differential ${\eta_c}$ such that$\displaystyle ( \omega, {}^* \eta_c) = \int_c \omega$

for any closed ${\omega}$

To prove this, find an annular neighborhood of the compact set ${c(S^1) \subset M}$, which is divided into ${R_1, R_2}$ as in the figure.

Choose ${\varphi}$ smooth on ${R_1}$ taking the value ${0}$ in a neighborhood of the outside part of ${\partial R_1}$, ${1}$ on a neighborhood of the inside part of ${R_1}$.Define the differential ${\eta_c}$$\displaystyle \eta_c = d \varphi \ \mathrm{inside} \ R_1 , \ \ 0 \ \text{elsewhere} .$

Now

$\displaystyle ( \omega, {}^* \eta_c) = - \int_{\overline{R_1}} \omega \wedge d \varphi = - \int_{\partial \overline{R_1}} \varphi \omega$

by Stokes theorem and since ${\omega}$ is closed. But this is

$\displaystyle \int_c \omega,$

proving the proposition.

Now fix a smooth ${\omega \in E}$; from its orthogonality to ${E^*}$ and smoothness is seen to be exact.

Smoothness of components

Fix a differential ${\theta \in L^2(M)}$, say$\displaystyle \theta = \alpha + \beta + \gamma$

where ${\alpha \in E, \beta \in E^*, \gamma \in H}$. We want conditions that will give local smoothness of ${\alpha, \beta}$ in case ${\theta}$ is in some neighborhood; ${\gamma}$ is always smooth.

Proposition 2 If ${\theta}$ is smooth and closed in a neighborhood ${U}$, so is ${\alpha}$.

This is local, so we can assume ${U}$ is a coordinate neighborhood with coordinate ${z = x+iy}$. Write$\displaystyle \theta = t_1 dx + t_2 dy, \ \alpha = a_1 dx + a_2 dy.$

We are given that ${t_1, t_2}$ are smooth; we need to prove that ${a_1, a_2}$ are. Take any smooth ${\phi}$ supported in ${U}$ and consider$\displaystyle (\theta, d \phi_x) = \int_U (t_1 dx +t_2 dy) \wedge ( -\phi_{xy} dx + \phi_{xx} dy) = \int_U t_1 \phi_{xx} + t_2 \phi_{xy} dx dy$

Similarly

$\displaystyle (\theta, {}^* d \phi_y) = - \int_U t_1 \phi_{yy} + t_2 \phi_{yx} dx dy$

The first equals ${(\alpha, d \phi_x)}$. The second is zero because ${\theta}$ is closed in ${U}$. So

$\displaystyle (\alpha, d \phi_x) = \int_U t_1 \Delta \phi .$

But we also have

$\displaystyle (\alpha, d \phi_x) = \int_U a_1 \Delta \phi$

if we apply the same reasoning to ${\alpha}$ itself! So as a result ${a_1 - t_1}$ is harmonic in ${U}$, hence smooth, and so is ${p}$. The other part of the proof is similar (replace ${d \phi_x}$ with ${{}^* d \phi_x}$, etc.).

format: plain


text:
# Converting Fractions into Decimals and Percentages

## Converting Fractions to Decimals and Percentages

Hello and welcome to this video about converting fractions to decimals and percents! In this video we will explore:

• How to visually convert fractions to decimals and percents and
• How to numerically convert fractions to decimals and percents

Before we get started, let’s review a couple of key concepts that we will use to help the math make sense.

Consider the fraction 10/10. One way to think about fractions is to think of them as division. 10 divided by 10 equals 1. In other words, ten tenths is one whole.

10/10 can be written equivalently as 100/100. The fraction bar can be said as “per”, so this expression can be said as “100 per 100”. The word “percent” literally means “per 100”, so “100 per 100” means 100 percent.

Therefore, when the same number is divided by itself, the result as a decimal is 1 and as a percent is 100%.

But what happens when our fraction is less than 1? Let’s take a look:

Consider the fraction ¼. Visually, this is what’s happening:

We can see in the diagram that 1/4 of the whole is $$\frac{25}{100}$$. $$\frac{25}{100}$$ means “25 per 100”, so it equals 25%.

Now let’s figure out how to convert this into a decimal.

First, we are going to take our fraction and reverse it. Instead of ¼, it is now 4/1, which is the same as saying 1 divided by 4.. Dividing this way doesn’t look like it will work. But using our knowledge of place value, we can make it work:

First, rewrite the 1 as 1.0. Instead of 1, the dividend is now ten tenths.
Second, 4 ones will go into ten tenths two tenths times (4 x .2 = .8).
Third, 4 x .2 = .8.

Fourth, 1.0 -.8 = .2
Fifth, rewrite the original dividend as 100 hundredths and bring the new 0 down.
Sixth, 4 ones goes into 20 hundredths 5 hundredths times (4 x .05 = .2).
Seventh, multiply 4 x .05 to get .20, and subtract to get 0.

This means ¼ = 0.25.

Let’s see this work with a non-unit fraction, like 3/16.

Here’s what the division looks like. The sequence of adding a decimal and dividing repeats as often as necessary until either the remainder is 0 or the decimal begins to repeat.

So, $$\frac{3}{16}=.1875. .1875=\frac{1875}{10000}=\frac{18.75}{100}$$. Therefore, .1875 is the same as 18.75 per 100, so .1875 is 18.75%.

How about a repeating decimal? Everything is the same and the process can be stopped when it is clear the decimal repeats. Here’s a quick example – 1/3:

The process of subtracting 9 units from 10 units repeats, causing the decimal to repeat.

Lastly, consider a fraction that is greater than 1, such as $$\frac{5}{2}$$.

Visually, here’s what we have:

We can see that the shaded quantity is $$\frac{1}{2}+\frac{1}{2}+\frac{1}{2}+\frac{1}{2}+\frac{1}{2}=\frac{5}{2}$$. Each 1/2 equals 50, so we can say equivalently $$\frac{250}{100}$$, which, as a decimal, is 2.5 (meaning 2 and a half wholes, which is what the diagram shows). We can also equivalently say 250 per 100, or 250%.

And the same works for the division as well:

Thanks for watching and happy studying!

306233

by Mometrix Test Preparation | Last Updated: April 17, 2020


text:
# nt.number theory – Stabilizer in \$G(mathbb{Z})\$ of point in fundamental domain \$G(mathbb{Z}) backslash G(mathbb{R}) / K\$

Let $$G$$ be a semisimple group (the cases of primary interest to me are where $$G$$ is a special linear group or a special orthogonal group), let $$K$$ be a maximal compact subgroup of $$G(mathbb{R})$$, and let $$Omega$$ be a fundamental domain for the left-action of $$G(mathbb{Z})$$ on $$G(mathbb{R})/K$$.

Question: For $$P in Omega$$, let $$S_P subset G(mathbb{Z})$$ be the stabilizer of $$P$$. If $$P$$ is restricted to lie in the interior of $$Omega$$, is $$#S_P$$ a constant? If so, is it possible to compute this constant for, say, $$G = operatorname{SL}_n$$ or $$G = operatorname{SO}(p,q)$$?

What I know:

• The answer is yes when $$G = operatorname{SL}_2$$. In this case, it is shown in Serre’s Cours d’arithmétique that the stabilizer of any $$P$$ in the interior of $$Omega$$ is given by $${pm 1}$$.
• The stabilizer in $$G(mathbb{R})$$ of $$P$$ is a conjugate of the subgroup $$K$$. Thus, $$#S_P$$ is the number of integral points in this conjugate subgroup, but I’m not sure how that varies with $$P$$.
• In his paper Ensembles fondamenteaux pour les groupes arithmétiques, Borel constructs a finite union $$U$$ of Siegel sets such that the set of elements $$gamma in G(mathbb{Z})$$ for which $$U cap gamma cdot U neq varnothing$$ is finite. I guess this means that $$#S_P$$ is bounded independent of $$P$$, but I’m not sure if the argument in Borel’s paper (or in his previous paper together with Harish-Chandra entitled Arithmetic Subgroups of Algebraic Groups) allows one to effectively compute $$#S_P$$.


text:
# findLowest() and findHighest() functions in this simple program

My code does the job for the most part, but I don't think the two functions that look for the highest and lowest score are the best approach. The instructions tell me to use the int as the return instead of double, but I can't tell how to take this approach.

A particular talent competition has 5 judges, each of whom awards a score between 0 and 10 to each performer. Fractional scores are allowed. The final score of a performer is determined by dropping the highest and lowest score received, then averaging the 3 remaining scores. Should include the following functions:

• void getJudgeData() - should ask the user for the judge's score, store it in a reference parameter variable, and validate it. Called in main() for each 5 judges.

• double calcScore() - should calculate and return the average of the 3 scores that remain after dropping the highest and lowest scores the performer received. This function can only be called once by main() and should be passed the 5 scores.

Two additional functions should be called by calcScore(), which uses the returned info to determine which of the scores to drop:

• int findLowest() - should find and return the lowest of the 5 scores passed to it.

• int findHighest() - should find and return the highest of the 5 scores passed to it.

#include <iostream>
#include <iomanip>
using namespace std;

// Function prototypes
void getJudgeData(double &someValue);
double calcScore(double a, double b, double c, double d, double e);
double findLowest(double aa, double bb, double cc, double dd, double ee);
double findHighest(double aaa, double bbb, double ccc, double ddd, double eee);

int main ()
{   double scores, avgValue, judge1, judge2, judge3, judge4, judge5;

// Ask for the score of each judge
getJudgeData(scores);
judge1 = scores;
cout << judge1 << endl;
getJudgeData(scores);
judge2 = scores;
cout << judge2 << endl;
getJudgeData(scores);
judge3 = scores;
cout << judge3 << endl;
getJudgeData(scores);
judge4 = scores;
cout << judge4 << endl;
getJudgeData(scores);
judge5 = scores;
cout << judge5 << endl;

//Outputs the average value
avgValue = calcScore(judge1, judge2, judge3, judge4, judge5);
cout << avgValue;

return 0;
}

/* getJudgeData asks the user for a score between 1 and 10
gets store in a reference value and validates the input. */
void getJudgeData(double &someValue)
{   cout << "Enter input of your score from 1-10";
cin >> someValue;
if (someValue < 1 || someValue > 10)
{ cout << "Please enter a valid score from 1-10";
cin >> someValue;
}
else {
someValue;
}
}

/* calcScore calculates and return the average of 4 scores that remain after
dropping the highest and lowest scores of the performer revieced. */
double calcScore(double a, double b, double c, double d, double e)
{   double rtValue;
double lowScore = findLowest(a, b, c, d, e);
double highScore = findHighest(a, b, c, d, e);

rtValue = ((a + b + c + d + e) - (lowScore + highScore))  / 3;

return rtValue;
}

double findLowest (double aa, double bb, double cc, double dd, double ee)
{
double lowestScore;

if ((aa < bb) && (aa < cc) && (aa < dd) && (aa < ee)) {
lowestScore = aa;
}
else if ((bb < aa) && (bb < cc) && (bb < ee) && (bb < ee)) {
lowestScore = bb;
}
else if ((cc < aa) && (cc < bb) && (cc < dd) && (cc < ee)) {
lowestScore = cc;
}
else if ((dd < aa) && (dd < bb) && (dd < cc) && (dd < ee)) {
lowestScore = dd;
}
else if ((ee < aa) && (ee < bb) && (ee < cc) && (ee < dd)) {
lowestScore = ee;
}
return lowestScore;
}

double findHighest (double aaa, double bbb, double ccc, double ddd, double eee)
{
double highestScore;

if ((aaa > bbb) && (aaa > ccc) && (aaa > ddd) && (aaa > eee)) {
highestScore = aaa;
}
else if ((bbb > aaa) && (bbb > ccc) && (bbb > eee) && (bbb > eee)) {
highestScore = bbb;
}
else if ((ccc > aaa) && (ccc > bbb) && (ccc < ddd) && (ccc > eee)) {
highestScore = ccc;
}
else if ((ddd > aaa) && (ddd > bbb) && (ddd > ccc) && (ddd > eee)) {
highestScore = ddd;
}
else if ((eee > aaa) && (eee > bbb) && (eee > ccc) && (eee > ddd)) {
highestScore = eee;
}
return highestScore;
}

• Welcome to Code Review! Part of your question is on-topic, and we can review the code you have provided, but this bit: "The instructions tell me to use the int as the return instead of double, but I can't tell how to take this approach" is asking us for help with coding concepts, and is not a matter for review. – Nick Udell Nov 3 '14 at 9:39
• I will remember that next time. Thank you. – RufioLJ Nov 3 '14 at 10:12

With C++11, some code may be simplified:

double findLowest (double aaa, double bbb, double ccc, double ddd, double eee)
{
return std::min({aaa, bbb, ccc, ddd, eee});
}

double findHighest (double aaa, double bbb, double ccc, double ddd, double eee)
{
return std::max({aaa, bbb, ccc, ddd, eee});
}

But if you use arrays and this algorithm, the code may be simplified even more:

/* calcScore calculates and return the average of 4 scores that remain after
dropping the highest and lowest scores of the performer revieced. */
double calcScore(const double (&a)[5])
{
auto it = std::minmax_element(std::begin(a), std::end(a));

return (std::accumulate(std::begin(a), std::end(a), 0.)) - (*it.first + *it.second))  / 3;
}

int main ()
{
double judges[5];

// Ask for the score of each judge
for (auto& judge : judges) {
getJudgeData(judge);
std::cout << judge << std::endl;
}

//Outputs the average value
avgValue = calcScore(judges);
std::cout << avgValue;

return 0;
}

• This looks very good, sadly I still haven't gotten into C++11 and I'm sure I'm required to use the basics. Thank you – RufioLJ Nov 3 '14 at 9:23
• @RufioLJ: My second sample use mainly mainly algorithm, the only C++11 feature I used is the for-range which can be rewritten for C++03 easily. – Jarod42 Nov 3 '14 at 9:32

You have a little bug in your application. The request had been each of whom awards a score between 0 and 10 but you define a invalid score (someValue < 1 || someValue > 10). So if you take between literaly, invalid should be (someValue < 1 || someValue > 9) or if you take it between with including the invalid should be (someValue < 0 || someValue > 10)

Naming

void getJudgeData(double &someValue);
double calcScore(double a, double b, double c, double d, double e);
double findLowest(double aa, double bb, double cc, double dd, double ee);
double findHighest(double aaa, double bbb, double ccc, double ddd, double eee);

these parameternames aren't meaningful. You should always use meaningful names for method names, method parameters and also variable names.

• You are right! I think there is also another bug that has to do with the findLowest() and findHighest() functions, whenever I input the 5 scores without going from low to high it throws an error. I was hoping to get some info on how to improve those 2 functions that look very forced. – RufioLJ Nov 3 '14 at 9:26
• About the naming, can I use the same parameters in different functions? I think no, right? I also thought this was bad but it was a quick way to prove if my two findLowest() and findHighest() functions worked. – RufioLJ Nov 3 '14 at 9:27
• @RufioLJ, you can use the same parameter names for the different methods. – Heslacher Nov 3 '14 at 9:28

You can simplify your code greatly, and make it more general-purpose, by using an array for the scores, rather than individual variables. So change e.g.

double scores, avgValue, judge1, judge2, judge3, judge4, judge5;

to

double scores[5], avgValue;

and use a loop to read in the five scores.

You'll also want to change functions such as calcScore so that they take an array rather than separate scores, e.g.

double calcScore(double scores[], int num_scores)
{
// ...
}

• this looks very good. I was forgetting about arrays! I will try using for loops and arrays and report back. Thank you – RufioLJ Nov 3 '14 at 9:24

Your use of the input routine getJudgeData() is a bit cumbersome. You can read directly into the variable you want.

int main() {
double judge1, judge2, judge3, judge4, judge5;

// Ask for the score of each judge
getJudgeData(judge1);
std::cout << judge1 << std::endl;
getJudgeData(judge2);
std::cout << judge2 << std::endl;
…
}

But that is repetitive. When you have a collection of variables that are more or less the same as each other, it is likely that an array is appropriate. (Better yet, use a std::vector<double>.)

double calcScore(double scores[], size_t n) {
…
}

int main() {
double scores[5];

// Ask for the score of each judge
for (int i = 0; i < sizeof(scores) / sizeof(scores[0]); i++) {
getJudgeData(scores[i]);
std::cout << scores[i] << std::endl;
}

// Output the average after discarding the extremes
std::cout << calcScore(scores, sizeof(scores) / sizeof(scores[0])) << std::endl;
}

That will easily scale up to any number of judges — just change the 5 to any number.

• I haven't gotten into c++11 yet, but I will take it into consideration. I'm in the process of converting some parts with arrays and for loops. I was still hoping to get some feedback on the last 2 functions that look very bad. Thank you – RufioLJ Nov 3 '14 at 9:28

The function void getJudgeData(double &someValue) has some flaws.

...
cin >> someValue;
if (someValue < 1 || someValue > 10)
{ cout << "Please enter a valid score from 1-10";
cin >> someValue;
}
...

One thing that pops out immediately is that this code only allows the user to make one mistake. If the user inputs two incorrect values in a row, it gets accepted regardless. To fix this you can use a while loop instead of an if statement.

The second issue I see is that if the user were to input non numerical values, then your code would crash. To fix this you should add some error checking to see if the input is indeed a number.

void getJudgeData(double &someValue)
{
std::cout << "Enter input of your score from 0-10" << std::endl;
while(true)
{
std::string input = "";
std::cin >> input;
std::stringstream myStream(input);
// myStream >> someValue will evaluate false if the str -> double conversion is
// invalid. If it is valid, the result is stored in someValue.
// The someValue >= 0 && someValue <= 10 checks will only be evaluated if the
// first condition is true. Meaning if the input is invalid, you don't have to
// worry about these checks breaking the program.
if (myStream >> someValue && someValue >= 0 && someValue <= 10)
{
return;
}
std::cout << "Invalid number. Enter input of your score from 0-10" << std::endl;
}
}


text:
# Substituting Arduino for ESP8266 in a (Yet Another!) Garage Door Controller

I have a garage door opener with two leads that will activate the motor if the leads are shorted. I hooked my multimeter into the leads and measured ~24VDC and triggered the motor ~50mA.

Using an Arduino Nano v3 as a power supply, I wired a simple push button to short the 3v3 output through a 100 Ohm resistor (R1) to the emitter side of the an H11AA1M optoisolator. The Arduino's ground goes to the other input of the emitter side of the optoisolator.

On the detector side of the optoisolator, I hooked the leads from the garage door opener through another 100 Ohm resistor (R2), and when I press the button, I can successfully control the garage door opener. I could be remembering things incorrectly, but I'm fairly certain I measured between 20-30mA across R2 when the door activates.

When I swap the Arduino for an implementation of the ESP8266 and swap the button for one of the ESP8266's GPIO, I cannot activate the garage door opener when I push gpio.HIGH across the connect GPIO. I also measured 20-30mA across R2.

If I toggle R1 or R2, I see different current values across R2, but if I'm fairly confident that I'm within tolerance for the necessary current to trigger the garage door opener. I ultimately want to drive my custom controller using the GPIO, and as far as I'm aware, I just need to activate the optoisolator's emitter to drive the transistor on the optoisolator's detector side into saturation.

What's going wrong? I'd love to know how to best diagnose my problem. I have a feeling that I'm not calculating something correctly based on the optoisolator's specs, but Googling hasn't led me to tutorial that hasn't made my head swim. I'm love some more insight into how to best read the optoisolator's specs and how they apply to my current and future projects.

(Please don't suggest I swap out the optoisolator for a relay. I realize that relays will probably be less finicky, but at this point, I'm more interested in the why than how.)

EDIT: I removed R2 and confirmed with the multimeter that >30mA run across garage door opener's leads, and now, the garage door opener is properly triggered!

• A schematic might help, you can add one using the editor, by pressing Ctrl-M. – Tyler Mar 28 '16 at 15:01
• Please provide a schematic, you probably don't have your grounds connected correctly and you actually have an open circuit now that you've gone wireless – Voltage Spike Mar 28 '16 at 19:53
• Your mention of measuring currents "across" components is a bit unsettling. Voltage is measured across components, while current is measured through them - so hopefully you broke the circuit and inserted the ammeter inline to reconnect it, rather than shorting the circuit with the meter. – Chris Stratton Apr 2 '16 at 17:11
• @ChrisStratton, I'm sorry for the poor choice of my words. I inserted the ammeter inline. – sl33nyc Apr 3 '16 at 17:22

The H11AA1M has a minimum CTR (Current Transfer Ratio) of 20%. That means if you have 20mA going through the emitter (LED) then the detector (transistor) may only be able to switch 20mA * 20% = 4mA.

You measured 50mA 'trigger' current when the garage door opener input was shorted, so you should be using an optocoupler that will switch that much current. ESP8266 GPIOs are only guaranteed to supply 12mA maximum, so your optocoupler should have a CTR of at least 50mA/12mA = 4.2.

So why does it work after removing R2? Your particular ESP8266 might manage to drive 20mA into a 100Ω resistor and infrared LED, and your individual optocoupler unit might achieve a CTR of >1.5 at 20mA. However the fact that it can't handle an extra 100Ω on the output suggests that it is barely working. It may fail in colder or hotter weather, or when the optocoupler transistor overheats because it is out of saturation.

For reliability you should increase the value of R1 to draw no more than 12mA from the ESP8266's GPIO, and change the optocoupler to one with higher CTR, eg. 4N33 or H11B3.

• Yes. One could presumably also use an at-hand NPN transistor and base resistor to achieve some current gain for driving the existing optocoupler. With the NPN as a low side switch the high-to-activate sense of the current setup would be preserved. – Chris Stratton Apr 2 '16 at 17:10


text:
# The correct determinant exponent of the weight $k$-operator for defining Hecke operators/adelizing modular forms

For $$g \in \operatorname{SL}_2(\mathbb R)$$, and $$\mathbb H$$ the upper half plane, and $$k\geq 1$$ an integer, the weight $$k$$-operator on functions $$f: \mathbb H \rightarrow \mathbb C$$ is defined by

$$f[g](z) = f(g.z) j(g,z)^{-k}$$

where $$j(g,z) = (cz+d)^{-1}$$, $$g = \begin{pmatrix} a & b \\ c & d\end{pmatrix}$$.

In order to define Hecke operators, or to adelize modular forms, or to identify modular forms as functions on $$\operatorname{GL}_2(\mathbb R)^+$$, it is necessary to extend this definition to $$g \in \operatorname{GL}_2^+(\mathbb R)$$. In A First Course in Modular Forms, in Chapter 5.1 Diamond and Shurman set

$$f[g](z) = f(g.z)j(g,z)^{-k} \det(g)^{k-1}$$

In Automorphic Forms and Representations, in Chapter 1.4 Bump sets

$$f[g](z) = f(g.z)j(g,z)^{-k} \det(g)^{k/2}$$

Which exponent of the determinant is better to use, and why? If we adelize a Hecke eigenform for $$\operatorname{SL}_2(\mathbb Z)$$ and look at the corresponding automorphic representation $$\pi = \otimes_p \pi_p$$, which normalization is better to define Hecke operators with, if we want the classical Hecke operator $$T_p$$ to coincide naturally with an action of the spherical Hecke algebra $$\mathscr H(\operatorname{GL}_2(\mathbb Q), \operatorname{GL}_2(\mathbb Z_p))$$ on the local component $$\pi_p$$?

Recall that to adelize a modular form $$f$$ of $$\operatorname{SL}_2(\mathbb Z)$$ of some given weight, we would first identify $$f$$ with a function $$\phi$$ on $$\operatorname{GL}_2^+(\mathbb R)$$ by setting

$$\phi(g) = f[g](i)$$

and then we would define an automorphic form $$\varphi$$ on $$\operatorname{GL}_2(\mathbb Q) \backslash \operatorname{GL}_2(\mathbb A)$$ by using the decomposition $$\operatorname{GL}_2(\mathbb A) = \operatorname{GL}_2(\mathbb Q) \operatorname{GL}_2^+(\mathbb R)K$$ for $$K$$ a suitable compact subgroup, writing $$g = \alpha g_{\infty}k$$, and setting $$\varphi(g) = \phi(g_{\infty})$$.

• The Bump "definition" is surely correct, and the other is a typo: for example, to make modular forms with trivial central character, the $k-1$ exponent will never succeed (maybe apart from $k=2$? in fact, was that the context for the Diamond-Shurman statement? It would still be a misleading way to write it, even if so...) You can also compare Shimura's. May 3, 2019 at 22:04
• In Diamond and Shurman they define it this way in Chapter 5 in order to introduce the double coset operator and then Hecke operators.
– D_S
May 3, 2019 at 22:07
• It doesn't matter. There is usually a factor of some exponent of the determinant in the definition of Hecke operators, so this normalization varies from author to author depending on the definition of the slash operator and vice-versa. The total exponent after you include the normalization of the Hecke operator would probably be the same.
– user35360
May 3, 2019 at 22:23
• As a diagnostic, perhaps also of what you're wanting to happen, do you want scalar matrices to act trivially, or by a power of determinant? And, by what power of det? For that matter, how much do you care about multiplying Hecke operators by scalars? The underlying effect is the same, whatever we do, ... May 3, 2019 at 22:33
• I wouldn't necessarily want scalar matrices to act trivially. Scalar multiples of Hecke operators are fine. I just want to be comfortable adelizing modular forms and Hecke operators in the cleanest way possible
– D_S
May 3, 2019 at 23:11

This is a question which has no "right" answer.

A posh interpretation of the choice of exponent is that a Hecke eigenform $$f$$ determines an equivalence class of irreducible representations $$\Pi = \bigotimes'_v \Pi_v$$ of $$GL_2(\mathbb{A}_\mathbb{Q})$$, differing by twists by powers of the character $$g \mapsto \|\det(g) \|$$, and the power of $$\det$$ that you put in the action of $$GL_2^+(\mathbb{Q})$$ determines which twist you get.

The normalisation that Diamond and Shurman use is the one that makes the eigenvalue of the double coset $$\begin{pmatrix} p & 0 \\ 0 & 1 \end{pmatrix}$$ on $$\Pi_p$$ correspond to the Fourier coefficient $$a_p(f)$$; while Bump's normalisation makes it correspond to $$a_p(f) / p^{(k/2-1)}$$.

From the perspective of the analytic theory of automorphic forms, Bump's choice is the "obviously right" one, since it makes $$\Pi$$ be unitary. Then you can find $$\Pi$$ as a subrepresentation of $$L^2(GL_2(\mathbb{Q}) \backslash GL_2(\mathbb{A}))$$ and the analytic theory works as it should. Since Bump's text emphasises the analytic theory of automorphic forms, this is the convention he chooses (and Paul Garrett's comment seems to be coming from the same viewpoint).

On the other hand, from the viewpoint of the algebraic theory (Galois representations, special values of L-functions, etc), the factor $$k/2$$ is extremely inconvenient, particularly when $$k$$ is odd. The $$a_p$$'s all lie in some common finite extension of $$\mathbb{Q}$$, but the eigenvalue of $$\Pi_p$$ has been multiplied by $$p$$ to a half-integer power; so the extension of $$\mathbb{Q}$$ generated by the eigenvalues is not finite, and correspondingly the critical values of the $$L$$-series are at half-integers rather than integers, meaning that the $$L$$-series of $$\Pi$$ cannot correspond to a motive. With Diamond and Shurman's normalisation, the finite part of $$\Pi$$ is definable over a number field, and its $$L$$-series is motivic. (This would work with any integer power of $$\det$$, but $$\det^{k-1}$$ is the minimal one which makes the Hecke eigenvalues algebraic integers.)

So the Diamond-Shurman normalisation is better for the algebraic theory, and the Bump normalisation for the analytic one.

There is a great quote on this (attributed to Deligne, but possibly apocryphal): "Langlands is very convinced he knows what the square root of $$p$$ is. I have never been so sure."


text:
# test Ameba test

## Recommended Posts

[&+-]

Edited by EdEarl
##### Share on other sites

• 4 months later...

[acr=Laughing Out Loud]LOL[/acr]

LOL

##### Share on other sites

• 4 weeks later...

test1...

$a$

test2...

${a}$

test3...

$123a$

test4...

$123.45\cdot a$

test5...

$123.45\cdota$

test 6...

$123,45a$

test7...

$abc$

test8...

$a \cdot b \cdot c$

test9...

$a_b$

test10...

${a}_{b}$

test11...

$a_{b}^{c}$

test12...

${abc}_{d ef}$

test 13...

$a b /c$

(PN: not enoguh space between variables 'a' and 'b')

test14...

$a _{b }+3.1 \cdot {10 }^{-12}$

(PN: minus sign is a bit too long and exponent should be placed a bit higher)

test15...

$3 \frac{x }{y }$

(PN: too much space between fraction line and numerator/denominator)

test16...

$2 \sin x \cos y$

test17...

$2 \, \mathrm{sin }\, x \, \mathrm{cos } \, y$

(PN: I had to add \, space to make this look nice)

test 18..

$a \bar{b }c$

test 19...

$x \mathbf{y }z$

test20...

$a b \mathtt{c }\delta \mathcal{Y }$

(PN: \mathcal{} works with uppercase letters only)

matrix test1...

$\left[ \begin{array}{ccc}s & b & c \\ x & y &z \\ a & & \end{array} \right]$

limes test1...

$\lim _{x \rightarrow \infty }\left( x +1 \right)$

underline/overline test....

$\underline{a b}\overline{c d}$

sqrt test...

$\sqrt{x }\sqrt[3 ]{y }$

'd' test...

$d x$

(PN: what about partial derivation sign??)

##### Share on other sites

(PN: what about partial derivation sign??)

$\partial x$

##### Share on other sites

$\partial x$

Thanks.

Please forgive me, I copied a post to get some examples and did not remove the questions and comments.

Edited by EdEarl
##### Share on other sites

• 1 month later...

You have mentioned time and time again that there is a singularity at the event horizon - this is an artifact. Your argument from post one, repeated many times and even spelled out in post 29 (sorry my post numbers might not match as I see all posts) relies on the fact that r_s/r will become the root of a singularity.

The Scchwarzchild Spacetime Geometry can be represented as follows

$ds^2 = -(1-2M/r)dt^2+\frac{dr^2}{1-2M/r}+r^2(d \theta^2+sin^2 \theta d\phi^2)$

This clearly hits problems when r=2M - ie at the Event Horizon where $g_{tt}$ becomes zero and $g_{\tau \tau}$ becomes infinite. This was originally thought to be evidence of a physical singularity at the EH - but Eddington showed that it was merely an artifact of the coordinate system being used - ie Schwarzchild Coordinates

##### Share on other sites

• 2 weeks later...

$\frac{d^2\theta}{dt^2} + C\frac{d\theta}{dt} + \kappa\theta = \tau(t)$

If the damping is small, $C \ll \sqrt{\frac{\kappa}{I}}\$,, as is the case with torsion pendulums and balance wheels, the frequency of vibration is very near the natural resonant frequency of the system:

$f_n = \frac{\omega_n}{2\pi} = \frac{1}{2\pi}\sqrt{\frac{\kappa}{I}}\,$

Therefore, the period is represented by:

$T_n = \frac{1}{f_n} = \frac{2\pi}{\omega_n} = 2\pi \sqrt{\frac{I}{\kappa}}\,$

The general solution in the case of no drive force ($\tau = 0\,$), called the transient solution, is:

$\theta = Ae^{-\alpha t} \cos{(\omega t + \phi)}\,$

where:

$\alpha = C/2I\,\omega = \sqrt{\omega_n^2 - \alpha^2} = \sqrt{\kappa/I - (C/2I)^2}$

##### Share on other sites

• 3 years later...

\Delta

What am I doing wrong?

Edited by EdEarl
##### Share on other sites

35 minutes ago, EdEarl said:

\Delta

What am I doing wrong?

You need to place $on each side in the latter half so I don't activate the command tags replace the % with a / [math] \Delta [%math] [math]\Delta$

You will need to refresh the page to see if it worked as well

Edited by Mordred
##### Share on other sites

ty

I see, the preview button when replying does not do math.

## Create an account

Register a new account


text:
# compatible.fv

0th

Percentile

##### Test Whether Two Function Objects Are Compatible

Tests whether two function objects (class "fv") are compatible.

Keywords
manip, spatial
##### Usage
compatible.fv(A, B)
##### Arguments
A,B
Function value objects (class "fv").
##### Details

An object of class "fv" is essentially a data frame containing several different statistical estimates of the same function. Such objects are returned by Kest and its relatives.

This function tests whether two such objects are compatible (so that, for example, they could be added or subtracted). The functions are compatible if they have been evaluated at the same sequence of values of the argument r, and if the statistical estimates have the same names.

##### Value

• Logical value: TRUE if the objects are compatible, and FALSE if they are not.

##### Aliases
• compatible.fv
Documentation reproduced from package spatstat, version 1.16-2, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.


text:
Share

Books Shortlist

# NCERT solutions for Class 12 Chemistry chapter 4 - Chemical Kinetics

## Chapter 4: Chemical Kinetics

#### Chapter 4: Chemical Kinetics solutions [Pages 98 - 116]

Q 1 | Page 98

For the reaction R → P, the concentration of a reactant changes from 0.03 M to 0.02 M in 25 minutes. Calculate the average rate of reaction using units of time both in minutes and seconds.

Q 2 | Page 98

In a reaction, 2A → Products, the concentration of A decreases from 0.5 mol L−1 to 0.4 mol L−1 in 10 minutes. Calculate the rate during this interval?

Q 3 | Page 103

For a reaction, A + B → Product; the rate law is given by, r = k[A]^(1/2)[B]^2 . What is the order of the reaction?

Q 4 | Page 103

The conversion of molecules X to Y follows second order kinetics. If concentration of X is increased to three times how will it affect the rate of formation of Y?

Q 5 | Page 111

A first order reaction has a rate constant 1.15 10−3 s−1. How long will 5 g of this reactant take to reduce to 3 g?

Q 6 | Page 111

Time required to decompose SO2Cl2 to half of its initial amount is 60 minutes. If the decomposition is a first order reaction, calculate the rate constant of the reaction.

Q 7 | Page 116

What will be the effect of temperature on rate constant?

Q 8 | Page 116

The rate of the chemical reaction doubles for an increase of 10 K in absolute temperature from 298 K. Calculate Ea.

Q 9 | Page 116

The activation energy for the reaction 2HI(g) → H2 + I2(gis 209.5 kJ mol−1 at 581K. Calculate the fraction of molecules of reactants having energy equal to or greater than activation energy?

#### Chapter 4: Chemical Kinetics solutions [Pages 117 - 120]

Q 1.1 | Page 117

From the rate expression for the following reactions, determine their order of reaction and the dimensions of the rate constants.

3 NO(g) → N2O (g) Rate = k[NO]2

Q 1.2 | Page 117

From the rate expression for the following reactions, determine their order of reaction and the dimensions of the rate constants.

H2O(aq) + 3 I− (aq) + 2 H+ → 2 H2O (l) + I_3^- Rate = k[H2O2][I]

Q 1.3 | Page 117

From the rate expression for the following reactions, determine their order of reaction and the dimensions of the rate constants.

CH3CHO(g) → CH4(g) + CO(g) Rate = [CH3CHO]3/2

Q 1.4 | Page 117

From the rate expression for the following reactions, determine their order of reaction and the dimensions of the rate constants.

C2H5Cl(g) → C2H4(g) + HCl(g) Rate = k [C2H5Cl]

Q 2 | Page 117

For the reaction: 2A + B → A2B  the rate = k[A][B]2 with k = 2.0 × 10−6 mol−2 L2 s−1. Calculate the initial rate of the reaction when [A] = 0.1 mol L−1, [B] = 0.2 mol L−1. Calculate the rate of reaction after [A] is reduced to 0.06 mol L−1.

Q 3 | Page 117

The decomposition of NH3 on platinum surface is zero order reaction. What are the rates of production of N2 and H2 if = 2.5 × 10−4 mol−1 L s−1?

Q 4 | Page 117

The decomposition of dimethyl ether leads to the formation of CH4, H2 and CO and the reaction rate is given by

Rate = [CH3OCH3]3/2 .The rate of reaction is followed by increase in pressure in a closed vessel, so the rate can also be expressed in terms of the partial pressure of dimethyl ether, i.e., Rate = k(p_(CH_3OCH_3))^(3/2)

If the pressure is measured in bar andtime in minutes, then what are the units of rate and rate constants?

Q 5 | Page 117

Mention the factors that affect the rate of a chemical reaction.

Q 6 | Page 118

A reaction is second order with respect to a reactant. How is the rate of reaction affected if the concentration of the reactant is (i) doubled (ii) reduced to half?

Q 8 | Page 118

In a pseudo first order hydrolysis of ester in water, the following results were obtained:

 t/s 0 30 60 90 [Ester]mol L−1 0.55 0.31 0.17 0.085

(i) Calculate the average rate of reaction between the time interval 30 to 60 seconds.

(ii) Calculate the pseudo first order rate constant for the hydrolysis of ester.

Q 9.1 | Page 118

A reaction is first order in A and second order in B. Write the differential rate equation.

Q 9.2 | Page 118

A reaction is first order in A and second order in B. How is the rate affected on increasing the concentration of B three times?

Q 9.3 | Page 118

A reaction is first order in A and second order in B. How is the rate affected when the concentrations of both A and B are doubled?

Q 10 | Page 118

In a reaction between A and B, the initial rate of reaction (r0) was measured for different initial concentrations of A and B as given below:

 A/ mol L−1 0.20 0.20 0.40 B/ mol L−1 0.30 0.10 0.05 r0/ mol L−1 s−1 5.07 × 10−5 5.07 × 10−5 1.43 × 10−4

What is the order of the reaction with respect to A and B?

Q 11 | Page 118

The following results have been obtained during the kinetic studies of the reaction:

2A + B → C + D

 Experiment A/ mol L−1 B/ mol L−1 Initial rate of formation of D/mol L−1 min−1 I 0.1 0.1 6.0 × 10−3 II 0.3 0.2 7.2 × 10−2 III 0.3 0.4 2.40 × 10−2 IV 0.4 0.1

Determine the rate law and the rate constant for the reaction.

Q 12 | Page 118

The reaction between A and B is first order with respect to A and zero order with respect to B. Fill in the blanks in the following table:

 Experiment A/ mol L−1 B/ mol L−1 Initial rate/mol L−1 min−1 I 0.1 0.1 2.0 × 10−2 II -- 0.2 4.0 × 10−2 III 0.4 0.4 -- IV -- 0.2 2.0 × 10−2
Q 13 | Page 119

Calculate the half-life of a first order reaction from their rate constants given below:

(i) 200 s−1 (ii) 2 min−1 (iii) 4 years−1

Q 14 | Page 119

The half-life for radioactive decay of 14C is 5730 years. An archaeological artifact containing wood had only 80% of the 14C found in a living tree. Estimate the age of the sample.

Q 15 | Page 119

The experimental data for decomposition of N2O5

[2N_2O_5 -> 4NO_2 + O_2] in gas phase at 318K are given below:

 t(s 0 400 800 1200 1600 2000 2400 2800 3200 10^2xx[N_2O_5]mol L^(-1) 1.63 1.36 1.14 0.93 0.78 0.64 0.53 0.43 0.35

(i) Plot [N2O5] against t.

(ii) Find the half-life period for the reaction.

(iii) Draw a graph between log [N2O5] and t.

(iv) What is the rate law?

(v) Calculate the rate constant.

(vi) Calculate the half-life period from and compare it with (ii).

Q 16 | Page 119

The rate constant for a first order reaction is 60 s−1. How much time will it take to reduce the initial concentration of the reactant to its 1/16th value?

Q 17 | Page 119

During nuclear explosion, one of the products is 90Sr with half-life of 28.1 years. If 1μg of 90Sr was absorbed in the bones of a newly born baby instead of calcium, how much of it will remain after 10 years and 60 years if it is not lost metabolically.

Q 20 | Page 119

For the decomposition of azoisopropane to hexane and nitrogen at 543 K, the following data are obtained.

 t (sec) P(mm of Hg) 0 35.0 360 54.0 720 63.0

Calculate the rate constant.

Q 21 | Page 119

The following data were obtained during the first order thermal decomposition of SO2Cl2 at a constant volume :SO2Cl2 (g) → SO2 (g) + Cl2 (g)

 Experiment Time/s–1 Total pressure/atm 1 0 0.5 2 100 0.6

Calculate the rate of the reaction when total pressure is 0.65 atm.

Q 21 | Page 119

The rate constant for the decomposition of N2O5 at various temperatures is given below:

 T/°C 0 20 40 60 80 10^5XXK/s^(-1) 0.0787 1.7 25.7 178 2140

Draw a graph between ln and 1/and calculate the values of and Ea. Predict the rate constant at 30º and 50ºC.

Q 23 | Page 120

The rate constant for the decomposition of hydrocarbons is 2.418 × 10−5 s−1 at 546 K. If the energy of activation is 179.9 kJ/mol, what will be the value of pre-exponential factor.

Q 24 | Page 120

Consider a certain reaction A → Products with = 2.0 × 10−2 s−1. Calculate the concentration of Aremaining after 100 s if the initial concentration of is 1.0 mol L−1.

Q 25 | Page 120

Sucrose decomposes in acid solution to give glucose and fructose according to the first order rate law. The half life of the reaction is 3 hours. Calculate fraction of sucrose which will remain after 8 hours.

Q 26 | Page 120

The decomposition of hydrocarbon follows the equation = (4.5 × 1011 s−1) e−28000 K/T

Calculate Ea.

Q 27 | Page 120

The rate constant for the first order decomposition of H2O2 is given by the following equation:

log = 14.34 − 1.25 × 10K/T. Calculate Ea for this reaction and at what temperature will its half-period be 256 minutes?

Q 28 | Page 120

The decomposition of A into product has value of as 4.5 × 103 s−1 at 10°C and energy of activation 60 kJ mol−1. At what temperature would be 1.5 × 104 s−1?

Q 29 | Page 120

The time required for 10% completion of a first order reaction at 298 K is equal to that required for its 25% completion at 308 K. If the value of is 4 × 1010 s−1. Calculate at 318 K and Ea.

Q 30 | Page 120

The rate of a reaction quadruples when the temperature changes from 293 K to 313 K. Calculate the energy of activation of the reaction assuming that it does not change with temperature.

## NCERT solutions for Class 12 Chemistry chapter 4 - Chemical Kinetics

NCERT solutions for Class 12 Chemistry chapter 4 (Chemical Kinetics) include all questions with solution and detail explanation. This will clear students doubts about any question and improve application skills while preparing for board exams. The detailed, step-by-step solutions will help you understand the concepts better and clear your confusions, if any. Shaalaa.com has the CBSE Chemistry Textbook for Class 12 solutions in a manner that help students grasp basic concepts better and faster.

Further, we at shaalaa.com are providing such solutions so that students can prepare for written exams. NCERT textbook solutions can be a core help for self-study and acts as a perfect self-help guidance for students.

Concepts covered in Class 12 Chemistry chapter 4 Chemical Kinetics are Rate of a Chemical Reaction, Factors Influencing Rate of a Reaction, Half-life of a Reaction, Collision Theory of Chemical Reactions, Temperature Dependence of the Rate of a Reaction, Integrated Rate Equations - Introduction, Zero Order Reactions, First Order Reactions, Pseudo First Order Reaction, Effect of Catalyst on the Rate of Reaction, Kinetic Energy of Molecule, Role of Catalyst, Rate Law and Specific Rate Constant.

Using NCERT Class 12 solutions Chemical Kinetics exercise by students are an easy way to prepare for the exams, as they involve solutions arranged chapter-wise also page wise. The questions involved in NCERT Solutions are important questions that can be asked in the final exam. Maximum students of CBSE Class 12 prefer NCERT Textbook Solutions to score more in exam.

Get the free view of chapter 4 Chemical Kinetics Class 12 extra questions for Chemistry and can use shaalaa.com to keep it handy for your exam preparation

S


text:
# medicine through time

HideShow resource information
 P Q G P F R D R B G P H K W U L G M U M R T H E G R E A T S T I N K Y W N K R P P O G J P N V T T J P L M F T M I Q C W X W I O E O Q B W F G R Y H A I M A L I Q L Y Y L D O P D X P E X F C E E O O O R G J K R R D V W A I V B L V D L Q Y S U C H T P E P C U N P O R Q W J F Y Q Y Q I D N P O D M C Q T S N H W G R U S R Y V S N P U R T W J S L J K N I E M L I E F F P A T R Y T A J M F S L F D W E E P N B V A N O S Y Q M T C A P N N V N T R Y N W T S O K V A K I T C H S A A N E X K C E L W T S V V K L J J Y U X S A H R S F I J E G E T Q H K T P J X E X H M O K V S C D F P U A W C E L J S L H C A L S N D W P R L H R W X K J C J A T H E H U N T E R G A T H E R E R S U R X X T D I D F I V R I W W D L U A J S O W U C Q T M W I F K O S D G C X S F N M R U D N G F J E U Q N R P E X R N V Q D V P T U B W N F F Y J W N A E C P G M O G Y G K Q D P H P J X I P K T O X T Q E G N N Y

### Clues

• Charms and amulets were carried by these in prehistory. (3, 6, 9)
• he accidentally discovered penicillin (9, 7)
• He came up with the idea of pasteurisation. (5, 7)
• he made the vaccination for smallpox. (6, 6)
• The egyptians had the idea that these were in the body. (8)
• they discovered the structure of DNA (6, 3, 5)
• when the thames dried out and all the human waste was at the bottom. (3, 5, 5)


text:
# Chemistry for medical professionals

## Change in entropy

The entropy of the entire system remains constant with completely reversible processes, with irreversible processes it increases.

Fig.1

The animation shows schematically two irreversible processes that are driven by the increase in entropy ($ΔS.>0$):

The heat exchange between two bodies until they are at the same temperature and diffusion is the concentration balance between solutions.


text:
# Eva Kopfer receives the Hausdorff Memorial Prize

Bonn, January 26, 2019. Every year the Department of Mathematics ("Fachgruppe Mathematik“) rewards the best PhD thesis with the Hausdorff Memorial Prize. This year Eva Kopfer was awarded this prize with her thesis “Heat Flows on Time-Dependent Metric Measure Spaces“, which she wrote under the supervision of Karl-Thedor Sturm. In her work, she studied gradient flows (with respect to energy and entropy) in the time-dependent case. In the time-independent case, it is well-known that the solution u(t) of the heat equation is the curve (in the $L^2$ space of probability densities) for which the function $t \to E(u(t))$ decreases most rapidly where $E$ is the energy. According to a groundbreaking work by Felix Otto, this curve (regarded as a curve in the space of probability measures, provided with the so-called Wasserstein metric) also reduces the entropy most rapidly. In the time-dependent case, not only does the functional change but also the underlying geometry. Thus, a priori it is not clear what is meant here by a gradient-flow curve and what the relationship between energy and entropy looks like. Eva Kopfer was able to answer all these questions at a high level of generality. Both gradient flows are also related in this case if one considers a reversal of time. These gradient flows are used to characterize the time evolution of the metric measure spaces as so-called super-Ricci flows. This result generalizes the characterization of synthetic lower Ricci curvature bounds in the sense of Lott-Sturm-Villani to the time-dependent setting, as well as the characterization of super-Ricci flows in the case of smooth Riemannian manifolds.

In addition, the Bonn Mathematical Society („Bonner Mathematische Gesellschaft“) awards a prize for the best graduating Bachelor students in mathematics every year endowed with 250 Euro. In the academic year 2017/2018, the following three graduating Bachelor students were awarded:

• Meike Neuwohner, “Trackless Track Assignment", advisor: Jens Vygen
• Adrian Riekert, "Statistical Mechanics of a Two-Dimensional Inviscid Fluid“, advisor: Massimiliano Gubinelli
• Niklas Schlomberg, "TSP mit dynamischer Programmierung", advisor: Jens Vygen.
Karl-Theodor Sturm (PhD Advisor and HCM Director), Eva Kopfer, Martin Rumpf (Head of the Department)
Ingo Lieb (President of the Bonn Mathematical Society), Meike Neuwohner, Adrian Riekert, Niklas Schlomberg


text:
Inverse of Group Product/General Result

Theorem

Let $\struct {G, \circ}$ be a group whose identity is $e$.

Let $a_1, a_2, \ldots, a_n \in G$, with inverses $a_1^{-1}, a_2^{-1}, \ldots, a_n^{-1}$.

Then:

$\paren {a_1 \circ a_2 \circ \cdots \circ a_n}^{-1} = a_n^{-1} \circ \cdots \circ a_2^{-1} \circ a_1^{-1}$

Proof 1

We have that a group is a monoid, all of whose elements are invertible.

The result follows from Inverse of Product/Monoid/General Result.

$\blacksquare$

Proof 2

Proof by induction:

For all $n \in \N_{> 0}$, let $\map P n$ be the proposition:

$\paren {a_1 \circ a_2 \circ \cdots \circ a_n}^{-1} = a_n^{-1} \circ \cdots \circ a_2^{-1} \circ a_1^{-1}$

$\map P 1$ is (trivially) true, as this just says:

$\paren {a_1}^{-1} = a_1^{-1}$

Basis for the Induction

$\map P 2$ is the case:

$\paren {a_1 \circ a_2}^{-1} = a_2^{-1} \circ a_1^{-1}$

which has been proved in Inverse of Group Product.

This is our basis for the induction.

Induction Hypothesis

Now we need to show that, if $\map P k$ is true, where $k \ge 2$, then it logically follows that $\map P {k + 1}$ is true.

So this is our induction hypothesis:

$\paren {a_1 \circ a_2 \circ \cdots \circ a_k}^{-1} = a_k^{-1} \circ \cdots \circ a_2^{-1} \circ a_1^{-1}$

Then we need to show:

$\paren {a_1 \circ a_2 \circ \cdots \circ a_{k + 1} }^{-1} = a_{k + 1}^{-1} \circ \cdots \circ a_2^{-1} \circ a_1^{-1}$

Induction Step

This is our induction step:

 $\ds \paren {a_1 \circ a_2 \circ \cdots \circ a_k \circ a_{k + 1} }^{-1}$ $=$ $\ds \paren {\paren {a_1 \circ a_2 \circ \cdots \circ a_k} \circ a_{k + 1} }^{-1}$ General Associativity Theorem $\ds$ $=$ $\ds a_{k + 1}^{-1} \circ \paren {a_1 \circ a_2 \circ \cdots \circ a_k}^{-1}$ Basis for the Induction $\ds$ $=$ $\ds a_{k + 1}^{-1} \circ \paren {a_k^{-1} \circ \cdots \circ a_2^{-1} \circ a_1^{-1} }$ Induction Hypothesis $\ds$ $=$ $\ds a_{k + 1}^{-1} \circ a_k^{-1} \circ \cdots \circ a_2^{-1} \circ a_1^{-1}$ General Associativity Theorem

So $\map P k \implies \map P {k + 1}$ and the result follows by the Principle of Mathematical Induction.

Therefore:

$\forall n \in \N_{> 0}: \paren {a_1 \circ a_2 \circ \cdots \circ a_n}^{-1} = a_n^{-1} \circ \cdots \circ a_2^{-1} \circ a_1^{-1}$

$\blacksquare$


text:
There is a newer version of this record available.

Dataset Open Access

# CSP.guru 2021-07-01

Johan Lilliestam; Richard Thonig; Alina Gilmanova; Chuncheng Zang

### Dublin Core Export

<?xml version='1.0' encoding='utf-8'?>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:contributor>Tim Tröndle</dc:contributor>
<dc:creator>Johan Lilliestam</dc:creator>
<dc:creator>Richard Thonig</dc:creator>
<dc:creator>Alina Gilmanova</dc:creator>
<dc:creator>Chuncheng Zang</dc:creator>
<dc:date>2021-07-01</dc:date>
<dc:description>This is the fourth version of CSP.guru produced during the openCSP project and reflects the state of play in the middle of 2021. As requested by CSP.guru users, we include for the first time a Microsoft Excel ".xlsx" for quick analysis, but also retain the data-package for machine readability.

This release has three new data fields: "Local_spelling", especially relevant for the Chinese plants, indicates the name in Mandarin or other alphabets. Second, we added two fields "hybridisation_capacity" and "Hybridisation_comment" to collect data on co-location of CSP plants with other power sources. Early plants often had a fossil fuel burner to increase the capacity factor, ISCC plants are integrated with a natural gas combined cycle, and modern CSP plants are often co-located or integrated with other renewable power sources, especially low-cost power generators from PV and wind.

In terms of projects, in the first half of 2021 one plant, Cerro Dominador in Chile, went online. To that, we added three plants in China as under construction namely Supcon Delingha 135 MW Tower, Shouhang Yumen 100 MW Tower and the Shenzhen Jinfan Akesai - 50MW Trough. For an upcoming analysis we also added some additional pilot plants. Additionally, we updated some data entries as better sources were available, including for the Hami project. The location of Duba Green ISCC was updated and the status set to under construction, as it is not clear that the plant is operational.  Finally, it is important to point out that the field "operational" means something different in China than in other countries. In China grid connection and first power production suffice to be eligible for the Feed-in-tariff, while in other contexts operational indicates the completion of the plant.</dc:description>
<dc:identifier>https://zenodo.org/record/5094290</dc:identifier>
<dc:identifier>10.5281/zenodo.5094290</dc:identifier>
<dc:identifier>oai:zenodo.org:5094290</dc:identifier>
<dc:relation>url:https://github.com/repolicy/csp-guru/tree/2021-07-01</dc:relation>
<dc:relation>doi:10.5281/zenodo.1318151</dc:relation>
<dc:rights>info:eu-repo/semantics/openAccess</dc:rights>
<dc:title>CSP.guru 2021-07-01</dc:title>
<dc:type>info:eu-repo/semantics/other</dc:type>
<dc:type>dataset</dc:type>
</oai_dc:dc>

4,655
2,666
views


text:
# PWM

Generate ideal pulse width modulated signal corresponding to input duty cycle

Since R2020b

Libraries:

## Description

Use the PWM block to generate an ideal pulse width modulated signal.

Pulse-width modulation (PWM) is a technique for encoding an analog signal using square pulses. This encoding is achieved by controlling the fraction of one period of the square wave that is set to high. This fraction is the duty cycle of the signal. The relationship between the modulated signal and the input duty cycle can be simply described as:

`$\overline{y}=D{y}_{max}+\text{}\left(1-D\right){y}_{min}$`

where ymax and ymin are the upper and lower bounds of the output signal, respectively. For the PWM block, the duty cycle is constrained to `[0,1]`. The ideal PWM signal is proportional to the duty cycle D.

## Ports

### Input

expand all

Desired duty cycle of the pulse P, specified as scalar within the range [0,1].

Data Types: `double`

### Output

expand all

PWM signal corresponding to the input duty cycle.

Data Types: `double`

## Parameters

expand all

Time between rising edges of consecutive pulses of the output signal. A small value represents a high-frequency pulse.

#### Programmatic Use

 Block Parameter: `Period` Type: string | character vector Values: real scalar Default: `'1'`

Specify an initial delay or phase delay for the generated PWM signal, in seconds.

#### Programmatic Use

 Block Parameter: `InitialDelay` Type: string | character vector Values: numeric scalar Default: `0`

Enable this parameter to break algebraic loops containing the PWM block.

Note

Enabling this parameter causes a signal value of 0 or below, which causes the duty cycle input to throw an error.

#### Programmatic Use

 Block Parameter: `DisallowZeroDutyCycle` Type: string | character vector Values: `'on'` | `'off'` Default: `'off'`

Specify when the block executes and the sample time for the output signal.

• `off` — Block executes each time the delay for an input sample elapses. Output signal has fixed-in-minor sample time.

• `on` — Block executes at a fixed rate you specify using the Sample time parameter. Output signal has the sample time you specify using the Sample time parameter.

When you select Run at fixed time intervals:

• The delay signal values must be greater than the value you specify for the Sample time parameter.

• Delay signal values that are not integer multiples of the specified sample time are rounded down to the nearest integer multiple of the sample time. For example, if the sample time is `0.1` and the delay signal value is `0.68`, the software rounds the delay to `0.6`.

#### Programmatic Use

 Block Parameter: `RunAtFixedTimeIntervals` Type: string | character vector Values: `'on'` | `'off'` Default: `'off'`

Block execution rate and output signal sample time. The delay signal values must be greater than the specified sample time.

When the delay signal value is not an integer multiple of the specified sample time, the software rounds the delay value down to the closest value that is an integer multiple of the sample time. For example, if the sample time is `0.1` and the delay value is `0.68`, the software rounds the delay to `0.6`.

#### Dependencies

To enable this parameter, select Run at fixed time intervals.

#### Programmatic Use

 Block Parameter: `SampleTime` Type: string | character vector Values: numeric scalar Default: `0.1`

## Block Characteristics

 Data Types `double` Direct Feedthrough `no` Multidimensional Signals `no` Variable-Size Signals `no` Zero-Crossing Detection `no`

expand all

## Version History

Introduced in R2020b


text:
Measuring the orientation sensitivity of a UHF RFID transponder, where do the deviations come from?

I measured the orientation sensitivity of a UHF RFID tag using a Voyantic Tagformance Lite RFID test device. I rotated the tag along the 3 axes using a stepper motor and a rotating table.

The device measures the path losses from the device to the tag location using a reference tag with known properties. I positioned the reference tag to the measurement location and started the calibration process. The device does a frequency sweep from 800-1000 MHz ands sends a read command at varying power levels until the tag responds. Once the tag responds, the path loss is calculated using the known properties of the reference tag.

Path loss = Transmitted power - Power on Tag

• Power on tag is a known property of the reference tag
• Transmitted power is the power level at which the tag responds

After the path loss has been measured for every frequency, the reference tag can be replaced with the tag under test. Using the same measurement as above, the device calculates the read range with following formula:

Where $$\P_{tag}\$$ = transmitted power (at which tag responds) - path loss (measured using the reference tag)

and $$\P_{max,EIRP}\$$ = 3.28 W

This is the first measurement orientation (I measured 4 copies of the same tag)

and here is the result as a polar diagram. Depicted is the read range as a function of orientation angle

Next rotation

and the result

Last measurement

Result

My questions:

1. The last measurement shows large deviations between the tags, what could be the reason for this? Could it be reflections from the rotating table? I could not properly reproduce the measurements, I always get more or less different results for this measurement.

Edit: What causes the fluctuations from angle 0 - angle 180? 180° - 270° is exactly what I expected. The material I put the tag on is styrodur, it is pretty much electromagnetically neutral.

2. Why is the overall shape of measurement 1 and measurement 2 different? I would have expected a very close result between those two measurements.

Overall, the results are more or less what I expected but there are some discrepancies that I can't explain. Can anyone shed some light on this? My guess would be that the rotating table is somehow interfering with the measurement in the last two experiments.


text:
# DOS confusion

1. Jul 13, 2010

### vin300

We have the rate of change of number of electrons with energy directly proportional to the volume in an 3-D potential well.
For a white dwarf, the mass is inversely proportional to its volume.

If we consider the electrons in a white dwarf to be in such a potential well, dN/dE becomes inversely proportional to the mass of the white dwarf which,to me, is hard to digest because with more mass the number of electrons is supposed to increase.

Last edited: Jul 14, 2010
2. Jul 14, 2010

### vin300

g(E)=kE^(0.5)
g(E) is the density of states, k a constant and E the energy of the state.
dN/dE =kVE^(0.5)
dN/dE is the rate of change of number of electrons with energy.
For a white dwarf,
R=(3.6*10^19)/M^(1/3)
where R is the radius and M the mass of the wd.
Since its volume is in inverse proportion to its mass, dN/dE becomes inversely related to the latter.But dN/dE is supposed to be directly proportional to its mass so that integration over all the energy levels gives more free electrons.

Last edited: Jul 14, 2010
3. Jul 17, 2010

### vin300

I got it.The temperature inside of a white dwarf is about 10^7K, at such temperatures, the distribution function given by
f(E)= [exp(E-Ef)/kT +1]^-1 is approximately 1 for all states, so integration of f(E)g(E)dE gives more electrons per unit volume.
As the volume of the white dwarf lowers, its mass rises, temperature rises bringing f(E) closer to 1.
That doesn't seem correct either.What after the white dwarf has cooled ?

Last edited: Jul 17, 2010


text:
1. Jun 26, 2003

Apparently the RIAA has won some lawsuits and now this is going to happen http://www.riaa.com/news/newsletter/062503.asp . They use bots to scan these networks so I'd say you might as well assume they have information on you if you get on a file sharing network that they are monitoring.

2. Jun 26, 2003

i can't imagine they'll go after every user... unless they have the time to take 5 million broke kids to court, and they most likely won't get any money, unless they're planning on taking college savings from them and putting them on the street. let's say i "theoretically" have 3000+ mp3's, that means i could get sued for 500 million bucks. there's no way in hell they're getting that much from me. i don't think my entire family will have made that much in their lifetimes. so imo, $150,000 per song is a load of crap. if they want me to pay damages, i got 5 bucks, and that's all they should expect to get. they just can't get$2,500,000,000,000,000 from a bunch of kids, who are probably helping the industry more than they're hurting it. and let us not forget, we download because of the music, man.


text:
# finding the eigenvectors of a matrix

let be a matrix $$\textbf{A}$$

$$\textbf{A} = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & \frac{x\alpha}{2H} \\ 0 & \frac{x\alpha}{2H} & 0 \\ \end{bmatrix}$$

The eigenvalues of $$\textbf{A}$$ are given by

$$\det(\textbf{A} - \lambda\mathbb{I}) = \det \begin{bmatrix} -\lambda & 0 & 0 \\ 0 & -\lambda & \frac{x\alpha}{2H} \\ 0 & \frac{x\alpha}{2H} & -\lambda \\ \end{bmatrix} = -\lambda(\lambda^2-(\frac{x\alpha}{2H})^2)=0$$ hence we find:

$$\lambda_{1}=0 \quad \lambda_{2,3} = \pm \frac{x\alpha}{2H}$$

In order to find the eigenvectors, we have to find the solution to

$$\begin{bmatrix} -\lambda & 0 & 0 \\ 0 & -\lambda & \frac{x\alpha}{2H} \\ 0 & \frac{x\alpha}{2H} & -\lambda \\ \end{bmatrix}\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}$$

for each of the three values of $$\lambda$$.

Thus we find the second eigenvalues $$\vec{e}_2 = \begin{pmatrix}0 \\ 1 \\1\end{pmatrix}$$ and the third eigenvalue $$\vec{e}_3 = \begin{pmatrix}0 \\ 1 \\-1\end{pmatrix}$$

Here is my question:

In the solution of the exercice I have, I'm given the first eigenvector as

$$\vec{e}_1 = \begin{pmatrix}1 \\ 0 \\0\end{pmatrix}$$

However, I would tend to say that the solution $$\vec{e}_1$$ with eigenvalue $$\lambda_1 = 0$$ is given by

$$\vec{e}_1 = \begin{pmatrix}0 \\ 0 \\0\end{pmatrix}$$

What am I missing?

You are missing the fact that the null vector is never an eigenvector. An eigenvector corresponding to an eigenvalue $$\lambda$$ is a non-null vector $$v$$ such that $$A.v=\lambda v$$.
• Thank you @Jose Carlos Santos. So $\begin{pmatrix}0 \\ 0 \\0\end{pmatrix}$ cannot be an eigenvector. Now, if we compute $\lambda_1 = 0$ in $\begin{bmatrix} -\lambda & 0 & 0 \\ 0 & -\lambda & \frac{x\alpha}{2H} \\ 0 & \frac{x\alpha}{2H} & -\lambda \\ \end{bmatrix}\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}$, how can we obtain the first eigenvector $\vec{e}_1 = \begin{pmatrix}1 \\ 0 \\0\end{pmatrix}$? – ecjb Dec 23 '18 at 22:50
• Solve the system $A.\begin{bmatrix}x\\y\\z\end{bmatrix}=\begin{bmatrix}0\\0\\0\end{bmatrix}$. You'll see that one of the solutions is $x=1$ and $y=z=0$. – José Carlos Santos Dec 23 '18 at 22:58


text:
# Cohomological AHSS for projective space $\mathbb{C}P^n$ ALWAYS collapses at the second page

While I was computing the cohomology ring $E^*(\mathbb{C}P^n)$ for $E$ an oriented ring spectrum, via AHSS I realised that orientation is not a necessary hypothesis in order to compute the cohomology of it.

In fact, for any cohomology theory $h^*$, we have that the second page of the AHSS is (by UCT) $$E^{s,t}_2\cong H^s(\mathbb{C}P^n)\otimes h^t(\text{pt.})$$ since we know that AHSS is a multiplicative spectral sequence, everything boils down to show that $$d_2(y\otimes \eta)=0$$ where $y$ is the "generator" of the cohomology ring $H^*(\mathbb{C}P^n)\cong \mathbb{Z}[y]/(y^{n+1})$

Let $i\colon \mathbb{C}P^1\to \mathbb{C}P^n$ be the inclusion, we know that it induces isomorphism in second cohomology. Therefore by naturality of the spectral sequence we know that $d_2(y\otimes \eta)=d(i^{-1}y'\otimes \eta)=i^{-1}d(y'\otimes \eta)$ where $y'$ is the "generator" of the cohomology ring of $\mathbb{C}P^1$. The latter differential is clearly zero since AHSS for $\mathbb{C}P^1$ has non zero column apart from the 0 and the second one. Therefore the AHSS collapses.

If we know that the spectral sequence is bounded below (i.e. for example induced by a bounded below spectrum), since the stable page is a free $h^*(\text{pt.})$-module we have that the stable page is isomorphic to $h^*(\mathbb{C}P^n)$, and we can even find the ring structure again by multiplicativity.

It seems that this is a powerful result, but I can't find it anywhere in the references. Maybe I'm missing some subtle point. Can someone provide me some references or finding the error?

I'm pretty sure the condition of complex orientability is necessary for the collapse of the spectral sequence; consider for example the AHSS for real $K$-theory of $\mathbb{C}P^n$.
In your argument, you seem to be supposing that there is a class in $E^* \mathbb{C}P^\infty$ (or rather $E^* \mathbb{C}P^n$) represented by $y \otimes \eta$ on the $E_2$ page whose pullback along the inclusion $i$ represents the generator of $E^* \mathbb{C}P^1$, which is the definition of a complex orientation of $E$.
• yes I found this morning a flaw in my reasoning, but completely forget to update! The flaw is the chain of equalities $d_2(y\otimes \eta)=d(i^{-1}y'\otimes \eta)=i^{-1}d(y'\otimes \eta)$, since I'm not allowed to consider $i^{-1}$ in the last step, since it's no more invertible there – Riccardo Jun 15 '16 at 18:24


text:
# Which equation has x = -2 as the solution? 2x + 10 = 14 2x + 8 = 4 3x + 10 = 1 3x – 8 = 7

###### Question:

Which equation has x = -2 as the solution?
2x + 10 = 14
2x + 8 = 4
3x + 10 = 1
3x – 8 = 7

### Who created the above christian portrait of saint james for the purpose of conveying the powerful presence of the apostle and remind people of the beginnings of christianity

who created the above christian portrait of saint james for the purpose of conveying the powerful presence of the apostle and remind people of the beginnings of christianity...

### What is the main goal of financial planning? A.) saving and investing for your needs in the future B.) lowering you tax liability C.) achieving personal economic satisfaction D.) spending to achieve your financial goals

What is the main goal of financial planning? A.) saving and investing for your needs in the future B.) lowering you tax liability C.) achieving personal economic satisfaction D.) spending to achieve your financial goals...

### Help can you teach me step by step how to solve this

Help can you teach me step by step how to solve this...

### The National Ambient Air Quality Standards (NAAQS) are maximum allowable levels for _____ harmful pollutants.a, sixteenb.sixtyc.six d.ten

The National Ambient Air Quality Standards (NAAQS) are maximum allowable levels for _____ harmful pollutants.a, sixteenb.sixtyc.six d.ten...

### 4.) A jogger ran at a rate of 3.7 miles per hour. Find the jogger's rate, in feet per minute. 1 mile=5,280 feet

4.) A jogger ran at a rate of 3.7 miles per hour. Find the jogger's rate, in feet per minute. 1 mile=5,280 feet...

### The process of transferring information from a journal entry to the specific accounts affected in the general ledger is referred to as:________.A) Journalizing.B) Posting. C) Balancing. D) Analyzing.

The process of transferring information from a journal entry to the specific accounts affected in the general ledger is referred to as:________.A) Journalizing.B) Posting. C) Balancing. D) Analyzing....

### What is the function of a licensing agreement?

What is the function of a licensing agreement?...

### Rewrite the equation y=-3/2x-5 in standard form. (Be sure no coefficients are fractions.)

Rewrite the equation y=-3/2x-5 in standard form. (Be sure no coefficients are fractions.)...

### This due tomorrowJimmy wants to make an experiment on how salt water can produce electricity, but he doesn't know how much salt he needs in the water. How much salt will it take to light up a light bulb?

This due tomorrowJimmy wants to make an experiment on how salt water can produce electricity, but he doesn't know how much salt he needs in the water. How much salt will it take to light up a light bulb?...

### A bag of M&M contains 1 blue for every 3 brown M&Ms. How many blue M & M’s should there be if there are 21 brown M&Ms in a bag?

A bag of M&M contains 1 blue for every 3 brown M&Ms. How many blue M & M’s should there be if there are 21 brown M&Ms in a bag?...

### What happened at the peace meeting between Texans and Comanche Indians in March 1840?

What happened at the peace meeting between Texans and Comanche Indians in March 1840?...

### What is the first thing that happens when a new cell is produced?

what is the first thing that happens when a new cell is produced?...

### What determines whether matter is a solid, liquid, or gas?

What determines whether matter is a solid, liquid, or gas?...

### For 17, can somebody tell me how to do this?

For 17, can somebody tell me how to do this?...

### Suppose that cos(t) = 8/17 and t is in the 4th quadrant. Evaluate sin(t+t) to 2 decimal places.

Suppose that cos(t) = 8/17 and t is in the 4th quadrant. Evaluate sin(t+t) to 2 decimal places....

### Ammonium phosphate ((NH), PO) is an important ingredient in many fertilizers. It can be made by reacting phosphoric acid (TI,PO.) with ammonia (NH) What mass of ammonium phosphate is produced by the reaction of 7.5 g of ammonia? Be sure your answer has the correct number of significant digits.

Ammonium phosphate ((NH), PO) is an important ingredient in many fertilizers. It can be made by reacting phosphoric acid (TI,PO.) with ammonia (NH) What mass of ammonium phosphate is produced by the reaction of 7.5 g of ammonia? Be sure your answer has the correct number of significant digits....

### What is an interdisciplinary health care team and why is it effective?

What is an interdisciplinary health care team and why is it effective?...


text:
×

# [Feature Request] Suggestions for brilliant

I suggestions to brilliant for challenge.I think we have to challenge twice time in a week each time with 5 problems.So problem can be open in Monday and in Thursday. All best :)

Note by Arbër Avdullahu
5 years ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

What would be the benefit of doing so? Correct me if I'm wrong, but I think that most students prefer a weekly structure, where they have time to work on the problems. Also, most students seem to like writing up their solutions over the weekend.

Staff - 5 years ago

You're right

- 5 years ago