text:
## Graphs - Connected components

Now that we can find all the nodes that are reachable from a given node, we are going to see how we can compute connected components of an undirected graph.

As the name suggests, the connected components of an undirected graph are the parts of the graph that are connected together, that is, the parts for which any two nodes have at least one path between them.

Example:

The following figure shows a graph on the left and its connected components on the right. Nodes on the same component are colored with the same color.

On the above graph, if we call BFS on node 0 we will visit nodes 0, 1, 2 and 3. In general, when we call BFS on node $$u$$, it will visit the whole connected component of $$u$$. Therefore we can compute all the connected components by keeping a global visited set and looping over the nodes of the graph and calling BFS for each unvisited node. Each call to BFS will visit a new connected component and we will avoid to vist the same connected component twice because the visited set will be global.

One way to represent the components is to have an array $$comp$$ such that $$comp[u] = comp[v]$$ if and only if nodes $$u$$ and $$v$$ are one the same connected component. We can achieve this by labelling all nodes of each BFS visit with an id $$compId$$ that we increment every time that we start a new BFS.

The following animation illustrates this process.

In terms of code it consists simply of adding a loop around our BFS code to try all nodes and adding the $$comp$$ array to keep track of the component of each node.

static Integer[] connectedComponents(LinkedList<Integer>[] g) {
Integer[] comp = new Integer[g.length];
int compId = 0;
for(int s = 0; s < g.length; s++) {
// check is s is already labeled
if(comp[s] != null) continue;
// s is not labeled, perform a BFS from it to compute its component
// initialize the queue and visited set
Queue<Integer> Q = new LinkedList<>();
// set the component of s
comp[s] = compId;
// loop while there are nodes in the queue to process
while(!Q.isEmpty()) {
int u = Q.poll();
// we are now processing node u
for(int v : g[u]) {
// visit edge (u, v)
if(comp[v] == null) {
// node v has not yet been visited, add it
// set the component of v
comp[v] = compId;
}
}
}
// finished labelling the component, increment the component id
compId += 1;
}
return comp;
}

##### Checking the components

You will be given an undirected graph and some number of queries each of them composed by two nodes. You have to compute the number of connected components of the given graph and for each query output whether the two given nodes are on the same connected component.

Input

• One line with two integers $$n$$ and $$m$$ giving the number of nodes in the graph and the number of edges respectively.
• $$m$$ lines each with two integers $$u_i$$ and $$v_i$$ giving that there is an undirected edge between $$u_i$$ and $$v_i$$. No edge will appear more than once in the input.
• One line with one integer $$q$$ giving the number of queries.
• $$q$$ lines each with two integers $$a_i$$ and $$b_i$$ giving the two nodes of the query.

Constraints

• $$1 \leq n \leq 20000$$
• $$0 \leq m \leq 100000$$
• $$1 \leq q \leq 10000$$
• $$0 \leq u_i, v_i < n$$
• $$0 \leq a_i, b_i < n$$

Output

The first line must contain the number of connected components in the graph.

Then follow $$q$$ lines with yes if the nodes $$a_i$$ and $$b_i$$ belong to the same connected component or no otherwise.

Sample Test Cases

Sample input 1

Sample output 1

Sample input 2

Sample output 2

Max file size: 1.0MB
Allowed extensions: .java, .cpp, .py

### Information

 Author(s) François Aubry Deadline No deadline Submission limit No limitation


text:
# Science talk:Math Exam Resources/Courses/MATH152/April 2016/Question A 21

## Contents

New solution based on geometric interpretation of projection 007:09, 24 March 2018
Hint and solution correct - but possibly not suitable for first years002:47, 13 March 2018
Incorrect Hint and Solution100:01, 13 March 2018

## New solution based on geometric interpretation of projection

According to the lecture note,

I think students also understand geometric picture of the projection operator. Actually, if you think this problems geometrically, it is easier to get the solution because you don't need to compute the projection matrix. So it would be great if anyone add a new solution based on this.

07:09, 24 March 2018

## Hint and solution correct - but possibly not suitable for first years

Hello,

The matrix in Hint 2 is correct (my bad :-( ). However, it appears that it would be hard for a student to figure out how to derive the matrix in Hint 2. Perhaps an easier way (assuming they have covered change of basis matrices) is to simply state that under the change of bases (conjugation by an appropriate rotation), the two matrices become

${\displaystyle {\begin{pmatrix}1&0\\0&0\end{pmatrix}}}$

and

${\displaystyle {\begin{pmatrix}0&0\\0&1\end{pmatrix}}}$

Best, Brian

02:47, 13 March 2018

## Incorrect Hint and Solution

Hello,

The formula given in hint 2 is incorrect. The first column of the matrix is correct, but the second column is not (permute the coordinates of the first column, and after that, take the negative of the first coordinate).

Best,

Brian

23:39, 12 March 2018

This is for MATH152/April 2016/Question A 21

00:01, 13 March 2018

format: plain


text:
# Display¶

Back to Scenes

Displays ndarrays as images, but is easier to use and more flexible than matplotlib’s imshow.

Functions:

 display(*imgs, **kwargs) Display 2D and 3D ndarrays as images with matplotlib. save_image(filename, *imgs, **kwargs) Save 2D and 3D ndarrays as images with matplotlib.
display(*imgs, **kwargs)[source]

Display 2D and 3D ndarrays as images with matplotlib.

The ndarrays must either be 2D, or 3D with 1 or 3 bands. If they are 3D masked arrays, the mask will be used as an alpha channel.

Unlike matplotlib’s imshow, arrays can be any dtype; internally, each is normalized to the range [0..1].

Parameters
• *imgs (1 or more ndarrays) – When multiple images are given, each is displayed on its own row.

• bands_axis (int, default 0) – Axis which contains bands in each array.

• title (str, or sequence of str; optional) – Title for each image. If a sequence, must be the same length as imgs.

• size (int, default 10) – Length, in inches, to display the longer side of each image.

• robust (bool, default True) – Use the 2nd and 98th percentiles to compute color limits. Otherwise, the minimum and maximum values in each array are used.

• interpolation (str, default "bilinear") –

Interpolation method for matplotlib to use when scaling images for display.

Bilinear is the default, since it produces smoother results when scaling down continuously-valued data (i.e. images). For displaying discrete data, however, choose ‘nearest’ to prevent values not existing in the input from appearing in the output.

Acceptable values are ‘none’, ‘nearest’, ‘bilinear’, ‘bicubic’, ‘spline16’, ‘spline36’, ‘hanning’, ‘hamming’, ‘hermite’, ‘kaiser’, ‘quadric’, ‘catrom’, ‘gaussian’, ‘bessel’, ‘mitchell’, ‘sinc’, ‘lanczos’

• colormap (str, default None) –

The name of a Colormap registered with matplotlib. Some commonly used built-in options are ‘plasma’, ‘magma’, ‘viridis’, ‘inferno’. See https://matplotlib.org/users/colormaps.html for more options.

To use a Colormap, the input images must have a single band. The Colormap will be ignored for images with more than one band.

Raises

ImportError – If matplotlib is not installed.

save_image(filename, *imgs, **kwargs)[source]

Save 2D and 3D ndarrays as images with matplotlib.

For an explanation of the rest of the arguments, please look under display(). For an explanation of valid extension types, please look under matplotlib :func:’savefig’.

Parameters

filename (str) – The name and extension of the image to be saved.


text:
# IBPS Clerk Quantitative Aptitude Questions with Answers Practice online test 52

Description: free IBPS Clerk Quantitative Aptitude Questions with Answers Practice test 52 for IBPS Clerk Preliminary and Main online test Prepare bank Clerk banking mock exams adda

1 . What will come in place of the question mark (?) in the following number series?
$1\,\,\, ? \,\,\,27 \,\,\,64 \,\,\,125$
 8 4 6 9 None of these
2 . What will come in place of the question mark (?) in the following number series?
$2\,\,\, 5 \,\,\,7 \,\,\,12 \,\,\,19 \,\,\,31 \,\,\,50 \,\,\,?$
 53 81 69 74 None of these
3 . What will come in place of the question mark (?) in the following number series?
$1\,\,\, 6 \,\,\,36 \,\,\,240 \,\,\,1960 \,\,\,?$
 19660 3680 36800 19600 None of these
4 .
The average of four positive integers is 72.5. The highest integer is 117 and the lowest integer is 15. The difference between the remaining two integers is 12. Which is the higher of these two remaining integers?
 73 84 70 Cannot be determined None of these
5 .
The population of a town is 8500. It increases by 20% in the first year and by another 25% in the second year. What would be the population of the town after two years?
 10950 12750 11950 12550 None of these
6 .
The difference between the simple interest and compound interest obtained on a principal amount at 5 p.c.p.a. after 2 years is Rs 35. What is the principal amount?
 Rs. 15000 Rs. 10000 Rs. 14000 Rs. 13000 None of these
7 .
'A' can complete a piece of work in 12 days. 'A' and 'B' together can complete the same piece of work in 4 days. In how many days can 'B' alone complete the same piece of work?
 6 days 8 days 15 days 18 days None of these


text:
×

# Help/Hint required.

Q1)Find the number of 4 digit numbers with distinct digits chosen from the set {0, 1, 2, 3, 4, 5} in which no two adjacent digits are even.

I'm not sure about the answer. I'm getting 60. There's a high chance I may be wrong.

Q2) Let a, b, c > 0. If $$\dfrac 1 c , \dfrac 1 b \quad and \dfrac 1 a$$ are in arithmetic progression, and if $$a^2+b^2,b^2+c^2,c^2+a^2$$ are in a geometric progression, prove that a=b=c

Somehow, I managed to get a=b=c. but I'm not really confident of my approach.

Q3) Let n be a positive integer such that 2n + 1 and 3n + 1 are both perfect squares. Show that 5n + 3 is a composite number.

I tried this

Let $$2n+1=k^2$$ and $$3n+1=m^2$$

$$5n+3=m^2+k^2+1$$

Then I used modulo to bash it out. am I on the right track? Because this doesn't seem to lead to the answer.

Thanks!

Note by Mehul Arora
1 year, 8 months ago

Sort by:

Q1) Let the odd digit be $$O$$ and even digit be $$E$$.So by product rule we can work out each case. So hereby I give the possible combinations:

$OEOO = 3\times 3 \times 2 \times 1 = 18 \\ OOEO = 3\times 2 \times 3 \times 1 =18 \\ EOOO = 2\times 3 \times 2 \times 1 = 12 \\ OOOE = 3\times 2 \times 1 \times 3 = 18 \\ EOOE = 2\times 3 \times 2 \times 2 = 24 \\ OEOE = 3\times 3 \times 2 \times 2 = 36 \\ EOEO = 2\times 3 \times 2 \times 2 = 24 \\ \Rightarrow 18+18+12+18+24+36+24 = \boxed{150}$ · 1 year, 8 months ago

Thanks Nihar! :D · 1 year, 8 months ago

Saale dost ko thanks bolta hain :P · 1 year, 8 months ago

Ahahahahahh xD

Chal nahi bolta thanks xD

Waapas liya thanks xD · 1 year, 8 months ago

For the record, here are the numbers:

 1 3210,,5210,,1230,,5230,,1250,,3250,,3410,,5410,,1430,,5430,,1450,,3450,,3012,,5012,,3412,,5412,,1032,,5032,,1432,,5432,,1052,,1452,,3052,,3452,,3014,,5014,,3214,,5214,,1034,,5034,,1234,,5234,,1054,,3054,,1254,,3254,,5031,,5231,,5431,,3051,,3251,,3451,,5013,,5213,,5413,,1053,,1253,,1453,,3015,,3215,,3415,,1035,,1235,,1435,,2301,,2501,,2341,,2541,,2103,,2503,,2143,,2543,,2105,,2145,,2305,,2345,,4301,,4501,,4321,,4521,,4103,,4503,,4123,,4523,,4105,,4305,,4125,,4325,,5301,,3501,,5321,,3521,,5341,,3541,,5103,,1503,,5123,,1523,,5143,,1543,,3105,,3125,,3145,,1305,,1325,,1345,,2310,,2510,,2130,,2530,,2150,,2350,,2314,,2514,,2134,,2534,,2154,,2354,,4310,,4510,,4130,,4530,,4150,,4350,,4312,,4512,,4132,,4532,,4152,,4352,,2531,,2351,,2513,,2153,,2315,,2135,,4531,,4351,,4513,,4153,,4315,,4135,,5310,,3510,,5130,,1530,,3150,,1350,,5312,,3512,,5132,,1532,,3152,,1352,,5314,,3514,,5134,,1534,,3154,,1354,
· 1 year, 8 months ago

Comp. Science Gawd is here. _/_ · 1 year, 8 months ago

For the 2nd one, We get that $$b=2ac/a+c$$ Substitute this in the second equation, $$( {b}^2+{c}^2)/({a}^2+{b}^2)=({ c}^2+{a}^2)/({b}^2+{c}^2)$$ By simplifying we get, a=b=c · 1 year, 8 months ago

Oh, I like question 3. The main way to show that a number is composite, is to factorize it and then show that the factors are not $$\pm1$$ Staff · 1 year, 8 months ago

Wait in Q1 when there asking for no two adjacent digits are even, doesn't that mean none of the digits are even ? O.O · 1 year, 8 months ago

Not necessarily I guess. The placement of the digits could be OEOO · 1 year, 8 months ago

Oh, so no two adjacent digits are both even? · 1 year, 8 months ago

Exactly :P · 1 year, 8 months ago

In that case I got 150 as an answer :(.

550 doesn't make sense because the maximum number of four digit numbers with distinct digits from the given set is $$5 \cdot 5 \cdot 4 \cdot 3 = 300$$ , which is less than your answer. · 1 year, 8 months ago

I got 60 as the answer. Could you please elaborate on how you got 150? · 1 year, 8 months ago

Oh! I guess i mistook the question for a,b,c and d not necessarily being distinct. Lemme work this one out. Till then, please work the other questions :) · 1 year, 8 months ago

Well I just took it in cases. You need at least one even and at most two evens.

So you just work from there. · 1 year, 8 months ago

Oh okay, thanks! :D · 1 year, 8 months ago


text:
# The farmer and the olive trees

A farmer has a rectangular ground of 100 m by 50 m, he wants to plant olive trees, in sufficiently spaced ways (to avoid exhaustion by the roots) at least 10 meters from each other.

How much can one hope to put at the most, effectively?

• May the trees be along the border of the rectangle, where their roots would extend 5 m (or more) outside of it?
– humn
Sep 9, 2017 at 16:19
• yes, the trees can be on the border Sep 9, 2017 at 16:26
• Has a correct answer been given? If so, please don't forget to $\color{green}{\checkmark \small\text{Accept}}$ it. If not, some responses to the answerers to help steer them in the right direction would be helpful.
– Rubio
Oct 2, 2017 at 5:22
• There is no justification for optimality @Rubio Oct 2, 2017 at 10:02
• Proving optimality for this sort of problem is notoriously difficult. I think a few very small cases have been solved rigorously, but none as large as this one. Oct 27, 2017 at 13:06

67 $68$

as shown in the flower kind figure below (This is the previous answer):

The idea behind this is

Starting to plant from the left and the right at the same time to the right, you will lose one tree every 1.8 meters as you see in the figure but gain 0.1 meter compared to putting trees all the corners etc. So after 10 trees, you will have an extra 6 tree to put as you see on the right side of the flower graph even though you lose 1 tree every 1.8 meters. At the end you will able to get extra onetwo trees to put in your farm compared to standard way of putting trees!

The main difference is actually starting from left and the right, after completing one vertical plantation, go for the next from the furthest point to the area in the farm

as you will see below:

• it is difficult to justify that the proposed solution is optimal. I wait to see if nobody does better. Sep 9, 2017 at 18:11
• @Dattier it has to be optimal since I have started from the very beginning of the rectangle and move to the with the least area covering from left to right. Though I may not able to show it mathematically.
– Oray
Sep 9, 2017 at 18:12
• @Dattier If you are asking for an optimal solution, you should know how to prove the answer is optimal. I think it would be better to ask "How can you plant x trees?", without worrying about whether x is optimal. At the very least, you should say up front that you do not know for sure what the optimal answer is. Sep 9, 2017 at 19:31
• I don't have an answer, but I know a very slow method, for find it. Sep 9, 2017 at 21:11
• To improve the visualisation, draw the circle around each tree at HALF the minimum distance to the next tree, then rather than overlapping by up to 1 radius creating a "flower kind figure", minimally-spaced trees would have circles that just touch, creating a circle packing solution - i.e. similar to the answer to a different problem that you linked here from yesterday. May 26, 2020 at 6:39

As in my answer to My Mother's Dish Collection, I used a nonlinear optimization solver, with variables $$x_i$$, $$y_i$$ to represent the coordinates of the trees. The constraints are: \begin{align} 0 \le x_i &\le 100 &&\text{for i\in\{1,\dots,68\}}\\ 0 \le y_i &\le 50 &&\text{for i\in\{1,\dots,68\}}\\ (x_i - x_j)^2 + (y_i - y_j)^2 &\ge 10^2 &&\text{for 1\le i The first two constraints make sure each tree is contained in the rectangle, and the third constraint enforces a distance of at least 10 between trees.

The resulting $$x$$ and $$y$$ coordinates returned by the solver are essentially the same as @Oray's packing.

The solver was not able to find a feasible solution for 69 trees, but I have no proof that 68 is the maximum.

• Circle packing density $\pi/(2\sqrt 3)$ implies an upper bound of $\lfloor (60\cdot 110)/(5^2 \cdot 2 \sqrt 3)\rfloor=76$. May 24, 2020 at 0:21


text:
THE SHRINKING PROJECTION METHODS FOR HEMI-RELATIVELY NONEXPANSIVE MAPPINGS, VARIATIONAL INEQUALITIES AND EQUILIBRIUM PROBLEMS

Title & Authors
THE SHRINKING PROJECTION METHODS FOR HEMI-RELATIVELY NONEXPANSIVE MAPPINGS, VARIATIONAL INEQUALITIES AND EQUILIBRIUM PROBLEMS
Wang, Zi-Ming; Kang, Mi Kwang; Cho, Yeol Je;

Abstract
In this paper, we introduce the shrinking projection method for hemi-relatively nonexpansive mappings to find a common solution of variational inequality problems and equilibrium problems in uniformly convex and uniformly smooth Banach spaces and prove some strong convergence theorems to the common solution by using the proposed method.
Keywords
variational inequality;equilibrium problem;hemi-relatively non-expansive mapping;shrinking projection method;
Language
English
Cited by
References
1.
Ya. Alber, Metric and generalized projection operators in Banach spaces: properties and applications, Theory and applications of nonlinear operators of accretive and monotone type, 1550, Lecture Notes in Pure and Appl. Math., 178, Dekker, New York, 1996.

2.
Ya. Alber and S. Reich, An iterative method for solving a class of nonlinear operator equations in Banach spaces, Panamer. Math. J. 4 (1994), no. 2, 39-54.

3.
E. Blum and W. Oettli, From optimization and variational inequalities to equilibrium problems, Math. Student 63 (1994), no. 1-4, 123-145.

4.
D. Butnariu, S. Reich, and A. J. Zaslavski, Weak convergence of orbits of nonlinear operators in reflexive Banach spaces, Numer. Funct. Anal. Optim. 24 (2003), no. 5-6, 489-508.

5.
S. S. Chang, On Chidume's open questions and approximate solutions of multivalued strongly accretive mapping equations in Banach spaces, J.Math. Anal. Appl. 216 (1997), no. 1, 94-111.

6.
P. L. Combettes and S. A. Hirstoaga, Equilibrium programming in Hilbert spaces, J. Nonlinear Convex Anal. 6 (2005), no. 1, 117-136.

7.
J. Fan, A Mann type iterative scheme for variational inequalities in noncompact subsets of Banach spaces, J. Math. Anal. Appl. 337 (2008), no. 2, 1041-1047.

8.
S. Ishikawa, Fixed points by a new iteration method, Proc. Amer. Math. Soc. 44 (1974), 147-150.

9.
S. Kamimura and W. Takahashi, Strong convergence of a proximal-type algorithm in a Banach space, SIAM J. Optim. 13 (2002), no. 3, 938-945.

10.
J. Li, On the existence of solutions of variational inequalities in Banach spaces, J. Math. Anal. Appl. 295 (2004), no. 1, 115-126.

11.
Y. Liu, Strong convergence theorems for variational inequalities and relatively weak nonexpansive mappings, J. Global Optim. 46 (2010), no. 3, 319-329.

12.
S. Matsushita and W. Takahashi, Weak and strong convergence theorems for relatively nonexpansive mappings in Banach spaces, Fixed Point Theory Appl. 2004 (2004), no. 1, 37-47.

13.
A. Moudafi, Second-order differential proximal methods for equilibrium problems, J. Inequal. Pure Appl. Math. 4 (2003), no. 1, 1-7.

14.
X. Qin, S. S. Chang, and Y. J. Cho, Iterative methods for generalized equilibrium problems and fixed point problems with applications, Nonlinear Anal. Real World Appl. 11 (2010), no. 4, 2963-2972.

15.
X. Qin, Y. J. Cho, and S. M. Kang, Convergence theorems of common elements for equilibrium problems and fixed point problems in Banach spaces, J. Comput. Appl. Math. 225 (2009), no. 1, 20-30.

16.
X. Qin, S. Y. Cho, and S. M. Kang, Strong convergence of shrinking projection methods for quasi-${\phi}$-nonexpansive mappings and equilibrium problems, J. Comput. Appl. Math. 234 (2010), no. 3, 750-760.

17.
S. Reich, Book Review: Geometry of Banach spaces, duality mappings and nonlinear problems, Bull. Amer. Math. Soc. (N.S.) 26 (1992), no. 2, 367-370.

18.
Y. Su, Z. Wang, and H. Xu, Strong convergence theorems for a common fixed point of two hemi-relatively nonexpansive mappings, Nonlinear Anal. 71 (2009), no. 11, 5616-5628.

19.
W. Takahashi, Nonlinear Functional Analysis, Yokohama-Publishers, 2000.

20.
W. Takahashi and M. Toyoda, Weak convergence theorems for nonexpansive mappings and monotone mappings, J. Optim. Theory Appl. 118 (2003), no. 2, 417-428.

21.
W. Takahashi and K. Zembayashi, Strong and weak convergence theorems for equilibrium problems and relatively nonexpansive mappings in Banach spaces, Nonlinear Anal. 70 (2009), no. 1, 45-57.


text:
# Plugin for showing cross-sells on the single product page in WooCommerce

I made a custom plugin for showing cross-sells on the single product page in WooCommerce, however i need to know if this is secure and possibly act as an attack vector. Additionally, is there a better way than a while loop for iterating through the products?

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {

function show_cross_sell_in_single_product(){
$crosssells = get_post_meta( get_the_ID(), '_crosssell_ids',true);$args = array(
'post_type' => 'product',
'posts_per_page' => 4,
'post__in' => $crosssells );$products = new WP_Query( $args ); if ($products ) : ?>

<?php esc_html_e( 'Passend dazu', 'woocommerce' ); ?>

<?php woocommerce_product_loop_start(); ?>

<?php while ( $products->have_posts() ) :$products->the_post();
wc_get_template_part( 'content', 'product' );
endwhile; // end of the loop. ?>

<?php woocommerce_product_loop_end(); ?>

<?php endif;

wp_reset_postdata();

}

/* todo removeaction woocommerce_after_single_product_summary, show_related */
}

• If anyone is interested in this code, I updated some things to reflect the comments of @Welcher and put everything on github (github.com/agcty/wc-ccs) complete with a description of how to use and customize it. – Alex Gogl Oct 11 '17 at 16:05

The code looks ok to me from a security point of view. You're not accessing the database directly and it looks like you are escaping the output ( assuming that the template part does the same ).

A couple of suggestions:

Instead of looking for the filename in the list of active plugins, use function_exists or class_exists to check to see if the plugin is enabled by looking for a function or class defined by the plugin. The reason being that options can be cached and filenames can be changed. Function/Class names rarely change and it's much cleaner looking.

if ( class_exists( 'WC_Query' ) ) {

Check to make sure that you're actually getting data returned in $crosssells = get_post_meta( get_the_ID(), '_crosssell_ids',true); before using it in the query. If there is no data, there's no point in querying the database. // Put this before the query$crosssells = get_post_meta( get_the_ID(), '_crosssell_ids',true);
if ( empty( $crosssells ) { return; }  WP_Query will always return something and so if($products ) will always be true. Use if( $products->have_posts() ) instead. This will only return true if there were posts returned from the query. To answer your question, the while loop is fine. That's what WordPress core and the bundled theme use. The only other suggestion I would make is for performance. Add a couple of items to your query args: $args = array(
'post__in' => $crosssells, /** * If you're not paginating, this skips MYSQL_CALC statments */ 'no_found_rows' => true, /** * Skips updating meta cache */ 'update_post_meta_cache' => false, /** * Skips updating term cache. */ 'update_post_term_cache' => false, );  Hope it helps! • Yes that definitely helps! However I came across two questions: 1) "global$product; $crosssells =$product->get_cross_sell_ids();" seems to be the new standard of getting the cross_sells, just tested it out and it seems to work, is this a viable option? 2) when checking if a certain class like "if ( class_exists( 'WC_Query' ) )" exists, the code wont run, also tried it with WooCommerce and others, how can this be possible when wordpress is activated and i clearly use WP_Query inside the code? – Alex Gogl Oct 10 '17 at 20:34


text:
# When using sigma notation, why is “1” put as value?

First of all, I never really learned exactly what Sigma notation is, and although I understand the basics, there are some things that are confusing me. I'm trying to convert the following algorithm to a sum so that I can find the time complexity:

for i <- 1 to n do
for j <- 1 to n do
for k <- i + j to 2n do
print(i, j, k)

Now I've been studying my professor's notes quite hard, and I've come up with the following: $$\sum\limits_{i=1}^n\sum\limits_{j=1}^i\sum\limits_{k=i+j}^{2n}c$$

However, in one of his (smaller) examples he put the following: $$\sum\limits_{i=1}^n\sum\limits_{j=1}^i1$$ where 1 was used instead of a value c. What is the difference between this?

Also, how should I get started on simplifying this? I am having difficulty getting started.

To clarify, I do not want the final answer, as I'm trying to learn what is happening here. Thanks!

-
$c=1$ in this case. –  Alex Becker Jan 30 '13 at 7:05
@Yep I'm not sure I understand your question. Are you asking if letting $c=1$ in the first formula yields the second formula and if the answer is yes, how? –  Git Gud Jan 30 '13 at 7:12
@GitGud: I guess the question you just asked helped me out a bit in any case. The problem is that I didn't even know how the second formula could work if it is 1, since there's nothing to plug the values into to get the summation, right? I think I'm epically confused. –  Yep Jan 30 '13 at 7:15

First of all, a brief intro to sigma notation:

$$\sum_{i=1}^n f(i)= f(1)+f(2)+f(3)+\ldots+f(n)$$ The notation just represents a finite sum of some quantity that depends (or perhaps doesn't depend) on some integer index (i.e. variable) $i$. In your case, you are using it to count loop operations. Take a simple example with a single for loop:

for i=1:n
i
end

The program performs exactly 1 operation during each loop. So, to count operations, we just need to add up the number $1$ $n$ times - the complexity is $\sum_{i=1}^n 1=n$. Now consider a slightly different loop:

for i=1:n
a=1+3*i;
end

Now, for each $i$ we are performing 2 operations - one addition and one multiplication (not counting say, memory overhead which would be negligible). So, to find the complexity, we need to add up the number $2$ exactly $n$ times: $\sum_{i=1}^n 2$. This is a different value of "$c$" corresponding to a different number of operations. Now, consider one more loop:

for i=1:n
i^i
end

Here, we are multiplying $i$ by itself $i$ times. So, the number of operations is no longer constant - it changes with each go through the loop. Now the complexity would look like $\sum_{i=1}^n i=1+2+3+\ldots+n$

Hope this helps, and good luck in your course!

-
"we just need to add up the number 1 $n$ times" – PERFECT. This is what I was missing. Thank you so much! –  Yep Jan 30 '13 at 7:20


text:
# Social Comparisons in Ultimatum Bargaining

### Citation:

Iris Bohnet,, & Zeckhauser, R. (2004). Social Comparisons in Ultimatum Bargaining. Scandinavian Journal of Economics , 106, 495–510.

### Abstract:

Experiments are used to examine the effects of social comparisons in ultimatum bargaining. We inform responders about the average offer before they decide whether to accept or reject their specific offer. This significantly increases offers and offer-specific rejection probabilities. For comparison, we consider another change in informational conditions: telling responders the total pie is \$30—ex ante it was either \$15 or \\$30—affects offers and rejection probabilities roughly as much. Our results are consistent with people’s dislike for deviations from the norm of equity but inconsistent with fairness theories, where people dislike income disparity between themselves and their referents.

Publisher's Version

Last updated on 11/24/2014


text:
1 hour later…
3:17 AM
0

I have seen qubits, qutrits & entangled bits (e-bits) a decent amount. I have also seen qunits/qudits for n-th level qubits. What I am trying to wrap my head around is the differences between n-th level e-bits vs n-th level qunits. What are the similarities? Differences? What generalizations ex...

3:33 AM
@Mithrandir24601 My issue with the answer isn't as much that it isn't perfect - rather I'm worried about the pretence going on there. Heather clearly threw around a few buzzwords and phrases like "quantum field theory", "quantum gravity", "complete", "Bell's inequality", "determinism" without understanding their implications in an answer.
It is usually good advice that one should not make claims about any theory (like "completeness") until they understand that theory (quantum field theory) well enough. Afaik quantum gravity isn't even well defined as of now.
Secondly, Heather clearly quotes my Hadamard state for single qubit and mentions that the difference with classical coins is "not satisfying Bell's inequality". That sentence itself made me extremely sceptical.
If at least (s)he mentioned quantum interference or something i'd leave it. (S)he once again tried to evade that one by saying (s)he is giving a "general idea" which sounds like a smart way to escape conversation to me. This is a very specific reason why I in particular mentioned a single qubit state in the question and not.
I have absolutely no idea how Bell's inequality is applicable to that one. And when I asked heather for a mathematical proof, (s)he tried to dodge that again. I can identify pretence when I see it, as I have done that before (pretended to be knowledge about something I'm not), myself, but I think it is a very bad habit. I personally would like to be pointed out if any of my answers sound like pretence. I'd immediately delete them.
Anyhow, got to follow up on SemiC's conversation today
I'm very much interested in the transition matrix formulation of Bell's inequality and interference

one typo in my conversation, which I'll mention here: I should've had tr[(UH+V)^T(UH+V)] (UH+V not UH-V)
and then V=-UH as the condition for equality
the upper bound I got was right, tho

4:03 AM
@Blue uh, what? I've been trying to engage you whenever you had a comment. that's not evading conversation. if i wanted to envade conversation, i wouldn't answer. and yeah, i mentioned quantum field theory and quantum gravity because i wanted to point out that quantum mechanics isn't "done" - there's bits we don't understand still. if you want me to remove that i will. i know quantum gravity isn't defined, i was giving the OP things to google, starting points.
that's half the battle, knowing what to google. determinism is not just a term i threw around, i discuss it in a large portion of the answer. further i didn't give a mathematical proof because a. what you were asking for didn't make sense and b. i didn't say anything that required a proof. i'm giving a general idea because that's what the OP asked for, not because i'm trying to evade conversation. yes, i quoted your comment, and the reason i quoted it was to set up that section of the answer.
i don't know everything there is to know about quantum computing, not even close. i'm not trying to pretend to.
i'm just trying to sketch out my understanding for the OP because I understand that it's really difficult learning from a wall of equations because I've been trying to figure stuff out from sources like that.
i've been trying to update and improve my answer based on your comments, and several of them have been really helpful, and i appreciate them.
so please don't accuse me of trying to be evasive and pretentious, that's the exact opposite of what i'm trying to do.

2 hours later…
5:55 AM
@heather Fair enough. To avoid making accusations about you, I'll speak objectively (which I agree, I should have):
1. So anyway, we got this new set of laws, quantum mechanics. And the development of those laws is complete, though not completely correct (see quantum field theories, quantum gravity) but the history of their development is kind of interesting.
What is meant by "complete" here?
And what is meant by "completely correct" here?
It's kind of vague to me
2. That portion which is circled above is again extremely vague to me. The "general" idea (in your words) which you're trying to give, doesn't sound general to at all if it can't even explain a 1-qubit system
@Blue there is no need for mathematical proof. Step back a minute. I'm using the idea of Bell's inequality to point out that, firstly, measurement is fundamentally different in quantum mechanics, and secondly, that quantum mechanics is not deterministic. Both of these points mean that any quantum system, including a qubit, is going to be fundamentally different from any classical system. — heather ♦ 9 hours ago
You even say that it is the "defining" difference!
It would be nice if you can elaborate on that part, after doing some more research. If you're interested I'm thinking of starting a fresh Q&A thread on exactly this issue.
3. This portion can be left as it is if you're sufficiently satisfied. No need to change this. However, I personally find determinism to be a very subtle issue. Maybe I'll ask about this on Physics SE because I do well understand the implications of determinism in different interpretations.
"For a while, there was debate. Hidden variable theories came up, where it wasn't just probability - there was a way the particle "knew" what it was going to be when measured; it wasn't all up to chance."
From here, what the idea behind "Hidden variable theory" even is, is opaque to me.
Why is it "hidden"? What is it called a "variable"?
"where it wasn't just probability - there was a way the particle "knew" what it was going to be when measured"
This sentence again is quite vague
If you want to give a beginner level overview of hidden variable theory, I think that Veritasium video does a really nice job. It would be great to have that kind of an explanation in an answer.
4. I appreciate that underlined sentence. Thanks for that
I'm at least happy that you think that your answer can be improved, which is exactly why I tried to point out the opacities in your answer and not for the other's in that thread (surely I didn't even attempt to, for this one and this one as the authors of those answers hardly respond well to constructive feedback - speaking from past interactions with them)
James Wotton's answer, however, looks fine to me, although it doesn't cover as many points as yours.
5. It would be nice if you could mention a bit about infinite dimensional spaces and operators in your answer. Linear algebra doesn't describe the infinite-dimensional cases in QM. Those fall in the domain of functional analysis (which I'm only a beginner in) apart from other things. A lot of linear algebra results aren't valid in those cases, unlike what introductory quantum computing textbooks seem to convey.
Fwiw, there isn't any need to hurry. However, at some point in time, it would be good if you can address these in your answer.
Meanwhile, I'll see if I can frame a fresh question regarding the Bell's inequality.
For now, I've deleted the comments from your answer, as they were making the comment section unnecessarily long. I think I've pretty much conveyed what I wanted to.

6:59 AM
@Blue the development of the laws of QM is far from 'complete', I'd argue...
@Blue At least, I'm assuming that 'complete' means 'finished', but it could also mean something like 'we now have a set of laws which is now self-consistent', which would make more sense
Or it could be a historical account, where 'complete' means 'fixed the issues with classical physics that were around at the time'

@Mithrandir24601 Yes, I agree with that. Which is why I mentioned that that usage is vague, to say the least

@Blue Depends on context, which I haven't read yet :P

Yup, surely context matters. But I was speaking about that answer in particular ;)

@Mithrandir24601 You know any source/reference for "multi-qubit controlled" gates and how to decompose them into standard gate sets?
Nielsen and Chuang doesn't seem to cover it very well

7:09 AM
@Blue If you can't simply decompose it into tensor/Kronecker products, Solovay Kitaev might be the way to go

I don't know Solovay-Kitaev :/ Would you recommend me to read the original paper?
I especially thinking about the decomposition of the $R(\lambda^{-1})$ gate in HHL

@Blue It should be explained in good lecture notes - Preskill might(?) have it. It's in Ashley Montanaro's notes to some level of detail and much more detail in Andrew Child's lecture notes
@Blue I have to read the most recent question of yours on that as well yet

(psst. everyone should keep "assume good faith" in mind.)

Okaies, I'm checking the lecture notes. Let's see if I can find something useful
@Mithrandir In my opinion, there's a subtle trade-off involved between being honest and assuming good faith. I'm really happy to have heather around, however, I feel they have a long way to go in terms of "maturity" (and so do I), otherwise we'll never be able to become the high quality site we aim to be. Ugh, that tone was a bit patronizing, but conveyed the point I guess!
MStern's words still sting me everyday and I'm working on improving.
"While the other nominees are highly motivated, their answers and questions sometimes show, that they do not see the big picture, yet."

7:46 AM
@Blue I'm reading this along the lines of 'we have [the Copenhagen interpretation of] quantum mechanics, which has a full set of self consistent laws but there are other issues to be sorted out, such as QFT and quantum theories of gravity'
Although there is a slight ambiguity, yeah

8:08 AM
to be fair, it's a bit more than just 'violation of Bell inequalities' and it involves e.g. sub-poissonian statistics and negative 'quasi-probabilities' of the Wigner function which allow for correlations, one example of which are Bell-type inequalities (Bell, CHSH etc.)

1

How do I show that a two-qubit state is an entangled state? includes an answer which references the Peres–Horodecki criterion. This works for 2x2 and 2x3 dimensional cases; however, in higher dimensions it is "inconclusive." It is suggested to supplement with more advanced tests, such as those ba...

1

It seems to be a widely held belief within the scientific community that it is possible to do "universal, fault-tolerant" quantum computation using optical means by following what is called "linear optical quantum computing (LOQC)" pioneered by KLM (Knill, Laflamme, Milburn). However, LOQC uses ...

Although these are, in a sense, equivalent statements - you might e.g. show a HOM dip with a source of a pair of photons. This isn't a Bell inequality violation, but the same source could be used to show a Bell violation
Or rather, the state produced in a (variant of a) HOM dip can then be used to violate a Bell inequality

8:34 AM
1

What is the difference between 3 qubits, 2 qutrits and a 6th level qunit? Are they equivalent? Why / why not? Can 6 classical bits be super-densely coded into each?

9:14 AM
0

Where can an aspiring student find answers to their deepest, darkest questions the exercises in Nielsen & Chuang's Quantum Computation and Quantum Information (10th Anniversary Edition) textbook?

0

Stack Overflow has a jobs page. Would that be possible to implement here? If yes, awesome! If no, alternative suggestions?

10:01 AM
0

This article from 2017 predicts 2030. Is this accurate? What are the biggest bottlenecks in the realization of the quantum internet?

I like the idea of a series with the N&C exercises. Should we have a tag for that? It would be an efficient way to collect all of them together without having to go to the meta post (that many won't even know exists anyway)
@heather that answer is becoming huge. Honestly, I believe that at a certain point when an answer is too long it defeats the purpose of stackexchange. If I have to read an entire treatise I may as well go read one of the countless introductions around the internet
it's also harder to do quality control when it's so long. Most people that know what you are talking about probably won't read it as it would take too long
maybe you could try to shorten it instead of expanding it? There are plenty of questions/answers around physics.SE about many aspects of that. If you could find some of those good posts and link them where due maybe it would improve the quality of the overall answer
@heather I also have to say that I disagree with the spirit of the first part. I don't think the fact that a qubit has a continuum of possible states qualifies as what makes it "quantum"
Finally, I'm unhappy with this sentence "And the development of those laws is complete, though not completely correct (see quantum field theories, quantum gravity) but the history of their development is kind of interesting" just as I was with its previous version. "Not completely correct" gives the wrong message here. While as in any theory there is always more work to do and something could happen to prove the theory wrong, I don't think there is anything in the current formalism of (...)
... QM that makes it "not completely correct". QM is perfectly self-consistent. There still are debated points regarding the measurement problem and such, yes, but honestly I think you are better off avoiding to mention that altogether.

10:48 AM
(oh, @heather, when you have a couple minutes, can you ping me in /rooms/58064/?)

3 hours later…
1:31 PM
0

Reproduced from Exercise 2.2 of Nielsen & Chuang's Quantum Computation and Quantum Information (10th Anniversary Edition): Suppose $V$ is a vector space with basis vectors $|0\rangle$ and $|1\rangle$, and $A$ is a linear operator from $V$ to $V$ such that $A|0\rangle = |1\rangle$ and $A|1\ran... 1:47 PM 0 In Ref. [1] absolutely maximally entangled (AME) states are defined as: An$\textrm{AME}(n,d)$state (absolutely maximally entangled state) of$n$qudits of dimension$d$,$|\psi\rangle \in \mathbb{C}^{\otimes n}_d$, is a pure state for which every bipartition of the system into the sets$B\$ ...

1 hour later…
2:52 PM
0

Quantum networks or quantum internet are terms that can be found when reading about quantum computation and information nowadys, but still I they are pretty vague concepts that are still in development. I was wondering about the fact that this networks or internet would be pretty limited in comm...

3:14 PM
do we really need the quantum-internet tag? I think quantum-networks would do just fine for these questions
oh, I see that tag also doesn't exist. Maybe we can have a general quantum-communication tag then?

2 hours later…
4:51 PM
@Mithrandir24601 that's what i was intending
@Blue thank you for that comprehensive list of points. I'll work through those as I have time.
@glS yeah, it's getting kinda long. I'll look through and see what is unnecessary/trimmable. As @Blue and @Mithrandir24601 also pointed out, yeah, that sentence is vague, and I'll be sure to fix that.
@glS finally, could you elaborate a bit on the "i'm unhappy with the first part" complaint? I'm a little unsure of what you mean there, sorry.
(could you quote the relevant sentence, perhaps?)
@Blue ouch =P

3 hours later…
8:04 PM
That looks like 9 questions asked today! Nice! :)
@glS Considering that every question tagged could also be tagged , I'd be inclined to say no

8:19 PM
@Mithrandir24601 wow that's good

If we can keep this up, we'll hopefully be out of public beta in no time :)

8:31 PM
yup =)
man, i need a break
i've spent the last hour or so learning techniques for solving differential equations

@Mithrandir24601 I'm suggesting using quantum-networks instead of quantum-internet. I don't think quantum internet really needs a tag of its own. There is just two questions with that tags its not a lot of work to change now

@glS Yeah, exactly (I'm saying that we don't need the tag, to be clear)
Just tried my first (rather small) tag merge, so hopefully that's worked now...

8:48 PM
@Mithrandir24601 oh, great


text:
# American Institute of Mathematical Sciences

2007, 2007(Special): 834-843. doi: 10.3934/proc.2007.2007.834

## Existence of weak solutions to the Navier-Stokes-Fourier system on Lipschitz domains

 1 Mathematical Institute, Academy of Sciences of the Czech Republic, Žitná 25, 115 67 Praha 1, Czech Republic

Received  September 2006 Revised  June 2007 Published  September 2007

We prove existence of a weak solution to the Navier-Stokes-Fourier system on a bounded Lipschitz domain in $\mathbb{R}^3$. The key tool is the existence theory for weak solutions developed by Feireisl for the case of bounded smooth domains. We prove our result by inserting an additional limit passage where smooth domains approximate the Lipschitz one. Results on sensitivity of solutions with respect to the convergence of spatial domains are shortly discussed at the end of the paper.
Citation: Lukáš Poul. Existence of weak solutions to the Navier-Stokes-Fourier system on Lipschitz domains. Conference Publications, 2007, 2007 (Special) : 834-843. doi: 10.3934/proc.2007.2007.834
 [1] Xin-Guang Yang, Rong-Nian Wang, Xingjie Yan, Alain Miranville. Dynamics of the 2D Navier-Stokes equations with sublinear operators in Lipschitz-like domains. Discrete & Continuous Dynamical Systems - A, 2020  doi: 10.3934/dcds.2020408 [2] Yang Liu. Global existence and exponential decay of strong solutions to the cauchy problem of 3D density-dependent Navier-Stokes equations with vacuum. Discrete & Continuous Dynamical Systems - B, 2021, 26 (3) : 1291-1303. doi: 10.3934/dcdsb.2020163 [3] Lingwei Ma, Zhenqiu Zhang. Monotonicity for fractional Laplacian systems in unbounded Lipschitz domains. Discrete & Continuous Dynamical Systems - A, 2021, 41 (2) : 537-552. doi: 10.3934/dcds.2020268 [4] Zhilei Liang, Jiangyu Shuai. Existence of strong solution for the Cauchy problem of fully compressible Navier-Stokes equations in two dimensions. Discrete & Continuous Dynamical Systems - B, 2020  doi: 10.3934/dcdsb.2020348 [5] Helmut Abels, Johannes Kampmann. Existence of weak solutions for a sharp interface model for phase separation on biological membranes. Discrete & Continuous Dynamical Systems - S, 2021, 14 (1) : 331-351. doi: 10.3934/dcdss.2020325 [6] Xiaopeng Zhao, Yong Zhou. Well-posedness and decay of solutions to 3D generalized Navier-Stokes equations. Discrete & Continuous Dynamical Systems - B, 2021, 26 (2) : 795-813. doi: 10.3934/dcdsb.2020142 [7] Xing Wu, Keqin Su. Global existence and optimal decay rate of solutions to hyperbolic chemotaxis system in Besov spaces. Discrete & Continuous Dynamical Systems - B, 2020  doi: 10.3934/dcdsb.2021002 [8] Lucio Damascelli, Filomena Pacella. Sectional symmetry of solutions of elliptic systems in cylindrical domains. Discrete & Continuous Dynamical Systems - A, 2020, 40 (6) : 3305-3325. doi: 10.3934/dcds.2020045 [9] Xuhui Peng, Rangrang Zhang. Approximations of stochastic 3D tamed Navier-Stokes equations. Communications on Pure & Applied Analysis, 2020, 19 (12) : 5337-5365. doi: 10.3934/cpaa.2020241 [10] Zhiting Ma. Navier-Stokes limit of globally hyperbolic moment equations. Kinetic & Related Models, 2021, 14 (1) : 175-197. doi: 10.3934/krm.2021001 [11] Bin Wang, Lin Mu. Viscosity robust weak Galerkin finite element methods for Stokes problems. Electronic Research Archive, 2021, 29 (1) : 1881-1895. doi: 10.3934/era.2020096 [12] Xing-Bin Pan. Variational and operator methods for Maxwell-Stokes system. Discrete & Continuous Dynamical Systems - A, 2020, 40 (6) : 3909-3955. doi: 10.3934/dcds.2020036 [13] Teresa D'Aprile. Bubbling solutions for the Liouville equation around a quantized singularity in symmetric domains. Communications on Pure & Applied Analysis, 2021, 20 (1) : 159-191. doi: 10.3934/cpaa.2020262 [14] José Luiz Boldrini, Jonathan Bravo-Olivares, Eduardo Notte-Cuello, Marko A. Rojas-Medar. Asymptotic behavior of weak and strong solutions of the magnetohydrodynamic equations. Electronic Research Archive, 2021, 29 (1) : 1783-1801. doi: 10.3934/era.2020091 [15] Leanne Dong. Random attractors for stochastic Navier-Stokes equation on a 2D rotating sphere with stable Lévy noise. Discrete & Continuous Dynamical Systems - B, 2020  doi: 10.3934/dcdsb.2020352 [16] Stefan Doboszczak, Manil T. Mohan, Sivaguru S. Sritharan. Pontryagin maximum principle for the optimal control of linearized compressible navier-stokes equations with state constraints. Evolution Equations & Control Theory, 2020  doi: 10.3934/eect.2020110 [17] Cung The Anh, Dang Thi Phuong Thanh, Nguyen Duong Toan. Uniform attractors of 3D Navier-Stokes-Voigt equations with memory and singularly oscillating external forces. Evolution Equations & Control Theory, 2021, 10 (1) : 1-23. doi: 10.3934/eect.2020039 [18] Andrea Giorgini, Roger Temam, Xuan-Truong Vu. The Navier-Stokes-Cahn-Hilliard equations for mildly compressible binary fluid mixtures. Discrete & Continuous Dynamical Systems - B, 2021, 26 (1) : 337-366. doi: 10.3934/dcdsb.2020141 [19] Pierre Baras. A generalization of a criterion for the existence of solutions to semilinear elliptic equations. Discrete & Continuous Dynamical Systems - S, 2021, 14 (2) : 465-504. doi: 10.3934/dcdss.2020439 [20] Helmut Abels, Andreas Marquardt. On a linearized Mullins-Sekerka/Stokes system for two-phase flows. Discrete & Continuous Dynamical Systems - S, 2020  doi: 10.3934/dcdss.2020467

Impact Factor:

## Metrics

• PDF downloads (30)
• HTML views (0)
• Cited by (0)

## Other articlesby authors

• on AIMS
• on Google Scholar

[Back to Top]


text:
# Evaluate the following definite integrals \int_{0}^{1}(x^{4}+7e^{x}-3)dx

Question
Applications of integrals
Evaluate the following definite integrals
$$\displaystyle{\int_{{{0}}}^{{{1}}}}{\left({x}^{{{4}}}+{7}{e}^{{{x}}}-{3}\right)}{\left.{d}{x}\right.}$$

2020-12-18
Given that
$$\displaystyle{\int_{{{0}}}^{{{1}}}}{\left({x}^{{{4}}}+{7}{e}^{{{x}}}-{3}\right)}{\left.{d}{x}\right.}$$
$$\displaystyle={{\left[{\frac{{{x}^{{{5}}}}}{{{5}}}}+{7}{e}^{{{x}}}-{3}{x}\right]}_{{{0}}}^{{{1}}}}\ {b}{e}{g}\in{\left\lbrace{b}{m}{a}{t}{r}{i}{x}\right\rbrace}\because\int{x}^{{{n}}}{\left.{d}{x}\right.}={\frac{{{x}^{{{n}+{1}}}}}{{{n}+{1}}}}+{C}\backslash\int{e}^{{{x}}}{\left.{d}{x}\right.}={e}^{{{x}}}+{C}{e}{n}{d}{\left\lbrace{b}{m}{a}{t}{r}{i}{x}\right\rbrace}$$
$$\displaystyle={\frac{{{1}}}{{{5}}}}+{7}{e}^{{{1}}}-{3}{\left({1}\right)}-{0}-{7}{e}^{{{0}}}+{3}{\left({0}\right)}$$
$$\displaystyle={\frac{{{1}}}{{{5}}}}+{7}{e}\cdot-{10}$$
$$\displaystyle={7}{e}-{\frac{{{49}}}{{{5}}}}$$
$$\displaystyle\therefore{\int_{{{0}}}^{{{1}}}}{\left({x}^{{{4}}}+{7}{e}^{{{x}}}-{3}\right)}{\left.{d}{x}\right.}={7}{e}-{\frac{{{49}}}{{{5}}}}$$

### Relevant Questions

Evaluate the following definite integrals:
$$\displaystyle{\int_{{0}}^{{1}}}{\left({x}^{{4}}+{7}{e}^{{x}}-{3}\right)}{\left.{d}{x}\right.}$$
Evaluate the following definite integrals
$$\displaystyle{\int_{{{0}}}^{{{1}}}}{x}{e}^{{{\left(-{x}^{{{2}}}+{2}\right)}}}{\left.{d}{x}\right.}$$
Which of the following integrals are improper integrals?
1.$$\displaystyle{\int_{{{0}}}^{{{3}}}}{\left({3}-{x}\right)}^{{{2}}}{\left\lbrace{3}\right\rbrace}{\left.{d}{x}\right.}$$
2.$$\displaystyle{\int_{{{1}}}^{{{16}}}}{\frac{{{e}^{{\sqrt{{{x}}}}}}}{{\sqrt{{{x}}}}}}{\left.{d}{x}\right.}$$
3.$$\displaystyle{\int_{{{1}}}^{{\propto}}}{\frac{{{3}}}{{\sqrt{{{3}}}{\left\lbrace{x}\right\rbrace}}}}{\left.{d}{x}\right.}$$
4.$$\displaystyle{\int_{{-{2}}}^{{{2}}}}{3}{\left({x}+{1}\right)}^{{-{1}}}{\left.{d}{x}\right.}$$
a) 1 only
b)1 and 2
c)3 only
d)2 and 3
e)1,3 and 4
f)All of the integrals are improper
Evaluate the following definite integral.
$$\displaystyle{\int_{{{0}}}^{{{\frac{{\pi}}{{{2}}}}}}}{x}{\cos{{2}}}{x}{\left.{d}{x}\right.}$$
Evaluate the following definite integrals:
$$\displaystyle{\int_{{0}}^{{1}}}{\left({x}{e}^{{-{x}^{{2}}+{2}}}\right)}{\left.{d}{x}\right.}$$
Evaluate the following integrals.
$$\displaystyle{\int_{{-{2}}}^{{-{1}}}}\sqrt{{-{4}{x}-{x}^{{{2}}}}}{\left.{d}{x}\right.}$$
$$\displaystyle{\int_{{{\left({1},{1},{2}\right)}}}^{{{\left({3},{5},{0}\right)}}}}{y}{z}{\left.{d}{x}\right.}+{x}{z}{\left.{d}{y}\right.}+{x}{y}{\left.{d}{z}\right.}$$
$$\displaystyle{\int_{{0}}^{{3}}}\sqrt{{{x}^{{2}}+{16}}}{\left.{d}{x}\right.}$$
$$\displaystyle{\int_{{-{{2}}}}^{{-{{1}}}}}\sqrt{{-{4}{x}-{x}^{{2}}}}{\left.{d}{x}\right.}$$
$$\displaystyle{\int_{{-{2}}}^{{{2}}}}{\left({3}{x}^{{{4}}}-{2}{x}+{1}\right)}{\left.{d}{x}\right.}$$


text:
# Sound unit testing of convergence of an implementation of a stochastic algorithm

(My statistics knowledge comes mainly from computer science, so I might be overthinking the following...)

I have implementations of several stochastic optimization algorithms (evolutionary algorithms, to be specific), and some unit tests for them, each one using fixed parameters on some known problems. These tests should ensure that the algorithms do indeed find an optimal solution reasonably well -- so they don't measure performance, but convergence to a known solution (a sanity check for the overall implementation). This is to make sure that when I change the implementation, no errors are introduced.

Now, there's some inconvenience: since I didn't spend too much time on parameter tuning, the unit tests sometimes don't converge (in the sense that the best found solution is not within some reasonable distance from the known optimum).

My intent is to improve this simple strategy to something more statistically sound. Assume just one unit test, with fixed parameters, known optimum $$x^*$$, and a distance function $$d$$. Independent test runs have independent outcomes $$X_i \sim D$$. We can introduce $$S_i = d(X_i, x^*) < c \sim \mathrm{Bernoulli}(p)$$, with $$p$$ the "test convergence rate", and $$c$$ a fixed cutoff for when we accept a solution "good enough".

Ideas:

• Is one result reasonably close to the optimum? This is the current situation. I just take one sample $$s_1$$. If $$s_1 = \mathtt{true}$$, the test succeeds.

The problem here is that the cutoff $$c$$ is too arbitrary. Larger $$c$$ makes the test fail less often, but decreases the strength of the assertion. Also, convergernce might just appear by accident (while actually being unlikely).

• Is the fraction of converging runs reasonable? Generalization of the above: estimating the true $$p$$ once by a large number of runs, then for the unit testing, take a (small) number of samples $$s_1, \ldots, s_n$$, and do a statistical test whether $$p$$ equals $$\hat{p}$$ estimated from those.

This has the disadvantage that the true $$p$$ might of course change if I change the implementation, and the cutoff is still arbitrary.

Alternatively, one could just estimate $$\hat{p}$$ and test whether it is "reasonably large" (ie., close to one). This avoids having to know the true $$p$$, but I wouldn't know how to test "reasonably large".

• Do the results lie within a reasonable distance from the optimum? Taking a sample $$x_1, \ldots, x_n$$, and using them to test whether the expected distance from the optimum is zero.

But what test to use? $$D$$ is unknown, and totally skewed ($$X_i$$ can never be above $$x^*$$, since that is the optimum).

I'd say that the third option is the best (but of course, it occured to me only during the writing of this question :)). So the questions are:

• Is the third option really good, and if yes, what test to use? Does the second one make any sense?
• Any other, better options? Something more Bayesian, perhaps?
• Is there any information or literature on this kind of testing? I would think that it is related to cross-validation, although here, we're interested in the actual result and variance, but the hypothesis whether the algorithm works correctly.
• This is way too broad a question. – user2974951 Jan 15 '19 at 12:24
• Really? I tried it to make it as specific as possible, instead of just asking "how to test GAs"... What exactly is too broad? – phipsgabler Jan 15 '19 at 12:49


text:
• On the time-scale of quasifission and Coulomb fission

• # Fulltext

https://www.ias.ac.in/article/fulltext/pram/096/0230

• # Keywords

Quasifission; Coulomb fission; fission.

• # Abstract

The Coulomb fission may take place in a reaction if the maximum Coulomb excitation energy transfer exceeds the fission barrier of either the projectile or the target nucleus. This condition is satisfied in all the reactions used for the earlier blocking measurements of fission time-scale except for the reaction $^{208}$Pb + natural Ge crystal, where the time-scale is below the measurement limit of the blocking technique $\les$ 1 as. Inclusion of Coulomb fission in the data analysis of the blocking experiments leads us to interpret the measured time-scales longer than a few attoseconds (as) (about 1–2.2 as) due to slow Coulomb fission and those shorter than 1 as, as due to quasifission and fast Coulomb fission. Consequently, this finding resolves the critical discrepancies between the fission time-scales measured using the nuclear and blocking techniques. This, in turn, validates the fact that the quasifission and fast Coulomb fission time-scales are indeed of the order of zeptosecond (zs) in accordance with the nuclear experiment sand theories. The present results thus provide an essential input to the understanding of the fusion evaporation reaction during the formation of heavy elements.

• # Author Affiliations

1. 1003 Regal, Mapsko Royal Ville, Sector 82, Gurugram 122 004, India
2. Department of Physics, Government College for Women, Kolar 563 101, India

• # Pramana – Journal of Physics

Volume 97, 2023
All articles
Continuous Article Publishing mode

• # Editorial Note on Continuous Article Publication

Posted on July 25, 2019


text:
## Fall 2015

• Instructor: Albert Y. Kim
• Email: aykim@middlebury.edu. Don’t be this person.
• Office: Warner 310
• Times:
• Lectures:
• Section A: MWF 9:05-9:55 - Warner 506
• Section B: MWF 10:10-11:00 - Warner 507
• Labs:
• Lab Y: Th 9:30-10:45 - Sunderland 202
• Lab Z: Th 11:00-12:15 - Sunderland 202
• Office Hours:
• M 2:00-3:30
• W 12:30-2:00
• or by appointment

## Course Description

This is an introductory probability and statistics class where a conceptual understanding of the material will be stressed. Goals of this course include:

• Expose students to statistical concepts, including sampling, data visualizations, confidence intervals, hypothesis tests, and regression.
• Give students experience manipulating and analyzing data using the R statistical software package.
• Introduce the theory underlying statistics, including probability, distributions, the central limit theorem, etc.
• Develop statistical literacy.
• Tie in the curriculum to current events, demonstrating the importance statistics plays in society.

## Course Schedule

All problem sets and solutions will be posted on the course Moodle page.

## Materials

• Textbook: OpenIntro Statistics 3rd Edition by Diez, Barr, and Cetinkaya-Rundel. This textbook is available
• Software: We will be using the R statistical software package via the RStudio Server interface, which you can access via your web browser at https://rstudio.middlebury.edu (note the https and not http). Note if you are off-campus you must first log into the Middlebury VPN.

## Evaluation

Item Weight Notes
Quizzes 5% Lowest score dropped. Relevant reading/video posted on Moodle the week prior with quiz taken at the beginning of lab.
Homeworks 35% Lowest score dropped. Lab HW assigned/due on Thursdays, written HW assigned/due on Wednesdays.
2 Midterms 30% In class.
Final 30% TBA

#### Policies

• Quizzes:
• There will be no makeup quizzes.
• Homeworks:
• Homeworks are due at the beginning of lecture/lab.
• Unstapled homeworks and homeworks without names/section numbers will be penalized 25%.
• Please do not email submissions; ask a classmate to print it for you.
• Late (defined as after lecture ending) submissions will be accepted up to 2 days after the due date at a 25% penalty per day. If you submit late, your graded homeworks might be returned late as well.
• You need to show all work to receive full credit.
• Midterms and Final Exam:
• There will be no make-up exams nor rescheduled exams, except in the following cases:
• serious illness or death in the family only if documentation is provided.
• athletic commitments or religious obligations only if documentation is provided and prior notice is given. In such cases, rescheduled exams must be taken before the rest of the class.
• All midterms/exams will require a scientific calculator. Smartphone calculators will not be accepted.
• Absences:
• There is no need to inform me of absences for lecture/lab. Please consult Moodle and your peers for what you missed.