## how to estimate maximum of Lebesgue function of arbitrary nodes?

Denote $$S_n=left{x_{n}=(x_{n0},x_{n1},…,x_{nn})|aleq x_0^{(n)} with -infty and ngeq 1. For any x_nin S_n, define the Lebesgue function L_{x_n}(x) by L_{x_n}(x):=sumlimits_{i=0}^{n}left|frac{prodlimits_{0leq jleq n,~jneq i}(x-x_{nj})}{prodlimits_{0leq jleq n,~jneq i}(x_{ni}-x_{nj})}right|. How to show that inflimits_{x_nin S_n}maxlimits_{xin[a,b]}L_{x_n}(x)geq Clog n for some constant C>0?$$

## the sum of two arbitrary different numbers in the sequence is always coprime with the sum of three arbitrary…

Does there exist a sequence of infinite positive integers $$a_1,a_2,…$$ such that the sum of two arbitrary different numbers in the sequence is always coprime with the sum of three arbitrary different numbers in the sequence?

Assume that there exist such sequence.

For every prime $$p$$, if there exist three numbers from the sequence $$a_i,a_j,a_k$$ that are divisible by $$p$$, then $$a_i+a_j$$ is not coprime with $$a_i+a_j+a_k$$, contradiction. Thus $$p$$ can divide at most two numbers from the sequence. Therefore there are at most two even numbers from the sequence and there are infinite odd numbers from that sequence.

However, if there are two even numbers, then the sum of two odd numbers is not coprime with the sum of two odd numbers and an even one, since both of the sum are greater than $$2$$ and are both even. Hence there is at most one even number from the sequence.

Here I am stuck. How can I progress ? Is there a better way to solve the problem ?

## How do I integrate a function defined over an arbitrary area?

Let’s say, I have a compact area $$S$$ (for example a circle, a square or some arbitrary polygon) and a function $$f: S rightarrow mathbb{R}$$. I want to numerically calculate the Integral
$$int_S f(vec{x}) mathrm{d}x approx sum_i f(x_i)Delta x_i$$
of the function over $$S$$.

My question is, how to choose the sapling points $$x_i$$ for “complicated” areas such as circles or shapes irregularly shaped borders. Can I simply overlay the aread with a equidistant lattice of sampling points and remove the ones not inside the area?

## FIR design for arbitrary magnitude and phase: Why can I separate real and imaginary parts like this?

In this question about the design of a FIR filter with arbitrary magnitude and phase specifications user robert bristow-johnson suggested to split the desired complex frequency response $$H$$ into its real and imaginary parts $$H_R$$ and $$H_I$$, then use firpm or firls to design two linear phase filters for both, setting the ftypeoption to hilbert for the imaginary part. Apparently, the sum of the two resulting FIR filters would yield a filter that meets the specification.

I’m trying to understand why this works. Here’s my attempt:
$$H_R = |H|cos(arg{H})$$
$$H_I = |H|sin(arg{H})$$
Now we design two FIR filters with firpm or firls, setting the ftypeoption to hilbert for the imaginary part. To my understanding, the frequency responses of the two resulting filters $$tilde h_R$$ and $$tilde h_I$$ will then look like this:
$$tilde H_R = Re{H} e^{jp(k)}$$
$$tilde H_I = Img{H} e^{jp(k)+jpi/2}$$
Where $$p(k)$$ is the linear phase term and the second filter has the additional phase shift due to the hilbert option that makes it a type III or IV FIR filter. The sum of the coefficients $$tilde h[k] = tilde h_R[k] + tilde h_I[k]$$ would then be a FIR with the frequency response
$$tilde H = tilde H_R + tilde H_I$$
because adding the coefficients is basically the same as adding the filter output signals for the same filter input signal.
$$tilde H = Re{H}cos(p(omega)) + Img{H}cos(p(omega) + pi/2) + jleft[Re{H}sin(p(omega)) + Img{H}sin(p(omega) + pi/2)right]$$
$$tilde H = Re{H}cos(p(omega)) – Img{H}sin(p(omega)) + jleft[Re{H}sin(p(omega)) – Img{H}cos(p(omega))right]$$
This looks nothing like the response $$H$$ that I actually want. And I don’t see how this could work. Is the original approach wrong or am I?

## Arbitrary behaviour of community via upvoting low quality questions and downvoting better questions…

• Diminishing returns / non-linear reputation from âgreatâ answers

• Life isn’t fair [duplicate]

A while back I saw a question (Q1) about why the unix command cat was called that and what was the use when you could simply use vim.
Question was well received and upvoted, but the actual reaction should have been, Asking “What research did you do ?”, which is a general site-requirement.

I also saw a question (Q2) about tee which (the OP claimed) did nothing and why it was so named.
Again, Question was well received and upvoted, but the actual reaction should have been, Asking “What research did you do ?”

Now I see a question (Q3) in CSE titled “Control Flow Statements Explained” but the title is not accurate; It is about running an infinite loop with a finite number of transistors.
Instead of upvoting or answering, the question should have been edited for clarity, which is a general site-requirement.

Again, in Puzzling SE, I sometimes see questions (Q4) which have so many “correct” answers that OP keeps saying “Oh, that is right but that is not what I was thinking” and finally accepts the nearest to what he was thinking.
Here a site-requirement is that Puzzle questions should have only one correct answer. Hence question should be Put on hold (or even Closed or Deleted) until it is edited such that only one answer is possible.

I have seen many more such cases of low quality Posts getting upvoted and getting into HNQ.

All these questions are well received and upvoted, but the actual reaction should have been something else.

Meanwhile, I have see questions which follow the site-requirements, are clear and are well-researched, but get downvoted and deleted, or edited beyond recognition.

Why such arbitrary behaviour by community ?

Some thoughts on why this happens:
(R1) a new question gets a view from a random newbie who may want rep Points, so he is ready to answer silly questions which can be answered elsewhere, and his initial upvote draws in more upvotes which may lead to HNQ selection.
(R2) a new question gets a view from somebody who downvotes questions he does not like [I have seen such comments like “I downvoted because I feel others may not be interested in this”] and this downvote leads to more downvotes.
(R3) Some readers think that answering is easier than editing questions ( Newbies may not even be aware of editing ) ; Now the answers bring in more viewership and more answers.
(R4) Some times, I see the formation of cliques, who upvote answers by each others.

I may be partially right or even entirely wrong. Hence I am asking here.

I also suggest the following:
(S1) Maybe remove downvoting. Upvote good questions. Flagging of Bad questions is enough. Ignore questions you are not interested in.
(S3) Let the site community select questions for HQN.
(S4) When a low quality Post is Deleted, inform (and may be Penalise) those who upvoted.

None of these suggestions will work, but maybe this Post will encourage thinking on this Issue (Provided, it does not get downvoted itself!)

## Does the sum of the outcomes of \$n\$ biased coin tosses equal any arbitrary integer \$b\$ at some point in time?

Given the situation that we have a coin which has probability $$p$$ of landing on heads and probability $$q=1-p$$ of landing on tails, with $$p>q$$. Let $$S_{n}=sum_{n}^{i=1}X_{i}$$, with $$X_i$$ the outcome of the $$i^{th}$$ coin toss.

This should be sufficient information (right?) to conclude that: $$lim_{nrightarrowinfty}(S_{n})=infty$$. So we know the following:

$$forall M geq 0: exists Ninmathbb{N}:forall n geq N:S_{n} geq M$$

Can we conclude from this that for any arbitrary integer $$b in mathbb{N}$$, we have that $$exists N in mathbb{N}:S_{N}=b$$?

My guess is that we can, because we can’t ”skip” over any integers due to the way the outcomes of the coin tosses are set up. However, I’m not sure if any conclusions leading up to the final question are invalid.

## How to build a jhbuild moduleset with an arbitrary command (chain)?

Some projects use custom build commands, like the boost library using the b2 command generated by the bootstrap.sh script shipped in the tarball. Those are not GNOME dependencies and jhbuild is not necessarily designed to handle such build tasks.

I’m trying to use jhbuild for arbitrary dependency trees and looked through the moduleset syntax documentation where the autotools module with it’s autogen-template attribute seems to be only one fitting the need to be able to build arbitrary modules, e.g.

autogen-template="bash -c 'cd %(srcdir)s && ./custom-build-command build && some-other-build-command'"

There’s no problem when skip-install is set to true, but then the module is rebuilt for every use as dependency which makes the moduleset less flexible.

Omitting skip-install causes make and make install to be invoked in the build directory which fails because no Makefile is present, however this can be compensated by specifying makeargs="--version" and makeinstallargs="--version". However, then the jhbuild internal post-installation routines cause failures in the form of

make DESTDIR=/home/gnome/jhbuild/install/_jhbuild/root-example --version
rc = jhbuild.commands.run(command, config, args, help=lambda: print_help(parser))
File "/home/gnome/jhbuild/checkout/jhbuild/jhbuild/commands/__init__.py", line 191, in run
return cmd.execute(config, args, help)
File "/home/gnome/jhbuild/checkout/jhbuild/jhbuild/commands/__init__.py", line 53, in execute
return self.run(config, options, args, help)
File "/home/gnome/jhbuild/checkout/jhbuild/jhbuild/commands/base.py", line 268, in run
return build.build()
File "/home/gnome/jhbuild/checkout/jhbuild/jhbuild/frontends/buildscript.py", line 163, in build
error, altphases = module.run_phase(self, phase)
File "/home/gnome/jhbuild/checkout/jhbuild/jhbuild/modtypes/__init__.py", line 421, in run_phase
method(buildscript)
File "/home/gnome/jhbuild/checkout/jhbuild/jhbuild/modtypes/autotools.py", line 322, in do_install
self.process_install(buildscript, self.get_revision())
File "/home/gnome/jhbuild/checkout/jhbuild/jhbuild/modtypes/__init__.py", line 317, in process_install
new_contents = fileutils.accumulate_dirtree_contents(destdir_prefix)
File "/home/gnome/jhbuild/checkout/jhbuild/jhbuild/utils/fileutils.py", line 45, in accumulate_dirtree_contents
_accumulate_dirtree_contents_recurse(path, contents)
File "/home/gnome/jhbuild/checkout/jhbuild/jhbuild/utils/fileutils.py", line 27, in _accumulate_dirtree_contents_recurse
names = os.listdir(path)
OSError: [Errno 2] No such file or directory: '/home/gnome/jhbuild/install/_jhbuild/root-example/home/gnome/jhbuild/install'

where even the creation of /home/gnome/jhbuild/install/_jhbuild/root-example/home/gnome/jhbuild/install in autogen-template with mkdir -p %(prefix)s/_jhbuild/root-[id]%(prefix)s doesn’t avoid this.

## Arbitrary behaviour of community via upvoting low quality questions and downvoting better questions

A while back I saw a question (Q1) about why the unix command cat was called that and what was the use when you could simply use vim.
Question was well received and upvoted, but the actual reaction should have been, Asking “What research did you do ?”, which is a general site-requirement.

I also saw a question (Q2) about tee which (the OP claimed) did nothing and why it was so named.
Again, Question was well received and upvoted, but the actual reaction should have been, Asking “What research did you do ?”

Now I see a question (Q3) in CSE titled “Control Flow Statements Explained” but the title is not accurate; It is about running an infinite loop with a finite number of transistors.
Instead of upvoting or answering, the question should have been edited for clarity, which is a general site-requirement.

Again, in Puzzling SE, I sometimes see questions (Q4) which have so many “correct” answers that OP keeps saying “Oh, that is right but that is not what I was thinking” and finally accepts the nearest to what he was thinking.
Here a site-requirement is that Puzzle questions should have only one correct answer. Hence question should be Put on hold (or even Closed or Deleted) until it is edited such that only one answer is possible.

I have seen many more such cases of low quality Posts getting upvoted and getting into HNQ.

All these questions are well received and upvoted, but the actual reaction should have been something else.

Meanwhile, I have see questions which follow the site-requirements, are clear and are well-researched, but get downvoted and deleted, or edited beyond recognition.

Why such arbitrary behaviour by community ?

Some thoughts on why this happens:
(R1) a new question gets a view from a random newbie who may want rep Points, so he is ready to answer silly questions which can be answered elsewhere, and his initial upvote draws in more upvotes which may lead to HNQ selection.
(R2) a new question gets a view from somebody who downvotes questions he does not like [I have seen such comments like “I downvoted because I feel others may not be interested in this”] and this downvote leads to more downvotes.
(R3) Some readers think that answering is easier than editing questions ( Newbies may not even be aware of editing ) ; Now the answers bring in more viewership and more answers.
(R4) Some times, I see the formation of cliques, who upvote answers by each others.

I may be partially right or even entirely wrong. Hence I am asking here.

I also suggest the following:
(S1) Maybe remove downvoting. Upvote good questions. Flagging of Bad questions is enough. Ignore questions you are not interested in.
(S3) Let the site community select questions for HQN.
(S4) When a low quality Post is Deleted, inform (and may be Penalise) those who upvoted.

None of these suggestions will work, but maybe this Post will encourage thinking on this Issue (Provided, it does not get downvoted itself !!!!)

## bash/ffmpeg: Mux together streams from an arbitrary amount of separate files

I have a collection of shows that have multiple files per episode that I’d like to mux into a single file for each episode.

Per episode, there’s one mp4 file that contains one video and one audio stream and then there are 1-9 .ass subtitle files with one language each.
The amount of languages is different for every show but can also change at points within the show.

The tree looks something like this:

show x/
show x eposide 1.mp4
show x eposide 1.enUS.ass
show x eposide 1.esLA.ass
show x eposide 1.ptBR.ass
...
show x eposide n.mp4
show x eposide n.enUS.ass
show x eposide n.esLA.ass
show x eposide n.ptBR.ass
show y/
show y eposide 1.mp4
show y eposide 1.enUS.ass
...
show y eposide 25.mp4
show y eposide 25.enUS.ass
show y eposide 25.esLA.ass
...
show y eposide n.mp4
show y eposide n.enUS.ass
show y eposide n.esLA.ass

In the end I’d like to have this:

show x/
show x eposide 1.mkv
...
show x eposide n.mkv
show y/
show y eposide 1.mkv
...
show y eposide 25.mkv
...
show y eposide n.mkv

where every Matroska file contains the video and audio stream from the mp4 and the subtitle streams from all the ass files available for that episode, bonus points if enUS is always the first subtitle stram.

There are about 60 shows with 5-863 episodes each (~53 average), so doing this manually for every episode is not feasible.

Looping over all shows and then having a nested loop loop over all episodes of that show is easy enough to do, I can also easily create a list of all .ass files available for an episode but the problem I face is that each input file needs to be specified with a separate input flag in ffmpeg and I can’t think of a way make that possible with an arbitrary amount of input files.

The only thing I could think of that’d at least achieve my goal is to have 9 ffmpeg commands with 1-9 hardcoded -i flags for the subtitle files and then call the one with the right amount of flags but that’s rather unclean and work intensive.

My question is whether there’s a cleaner and/or more modular way to achieve my goal.