text:
## 3.1 System introduction

The vehicle host computer is equipped with a visual navigation system. The robot trolley can move and inspect autonomously with the system, When encountering obstacles, the trolley will also autonomously dodges and bypass.

(1) In the mode of remote control image transmission, the operator controls the device remotely to surround the motion area for twice to establish a visual map that the robot can understand.

(2) Draw the inspection trajectory of robot and set the target point manually on the visual navigation map created in step 1 using the control software.

(3)Start the inspection after the path and target point are set. Selecting the target point, then the robot will move utonomously to the target point along the trajectory planned in step 2.

## 3.2 The creation of map

Opening the remote control image transmission according to the operation in Chapter 2, set the speed of chassis movement as about 20%. Click the button“ Start Drawing” on the main interface and wait 10 seconds.

Open the visual system output image.

Telerobot moves straight forward until the vision system initializes successfully.

Now starting of the vision system has been finished, the telerobot begins to moving in the movement area. Try to avoid pure rotation in the process of remote control (just pressing the key turn left or right wil cause the lost of vision system for targets easily). Please press the key forward and turn left or right simultaneously so as to turn the robot along the large radius trajectory.

During remote control, please make sure that the visual indication status in the main interface is "Tracking". Once it becomes red "lost", please retreat the telerobot to the normal state of previous period. You must use the back button to finish the retreating process, at the same time, keep the orientation and perspective of the robot unchanged.

Please do not operate the robot temporarily if "Closed loop optimization" appears in the Visual indication status during remote control. When the path that the robot walks forms a circle, the robot will automatically optimize the map established previously, which will greatly improve the quality of the map. Therefore, in order to establish a more accurate map, you can remotely control the robot to walk multiplely along closed paths in the process of establishing a map. Importantly, the quality of the map will greatly influence the effect of navigation later.

When the robot has browsed the entire motion area, stop moving, click the button "Save Map" on the main interface, and wait for the save dialog to pop up. Enter the name of map in the dialog and click "OK ". Wait for the map to finish loading.

After the map is loaded, you can see the approximate effect of the map which you just established. If you feel more satisfied, you can click the button " Finish Map ". Then the section about establishment of map is finished.

The demo video of this section:

The process of Visual map creation.

In case of emergency, please press the red switch manually on the trolley to stop it.

## 3.3 The drawing of inspection trajectory and site

Warning: Because planning trajectory need to download and render the visual map, the client exchange large amounts of data with the trolley host, the whole process takes a long time. So for the execution of the following steps, please waiting for the update of the client software interface patiently.

Open the control software, click the button "Unconnected" to connect with the chassis, click on the button" draw navigation map" to open the editing interface of inspection path on the main interface.

### 3.3.a Drawing the inspection trajectory

The inspection trajectory is the path you want the robot to walk on. After clicking the button "Start Navigation" on the main interface, the robot will move according to the path you have drawn. Here, we will introduce how to use the path drawing tool.

• 1. Basic operation

Basic operations contain pan and zoom. Panning of the map is achieved by draging the map with the left mouse button. Zoom of the map is achieved by scrolling he mouse forward and backward. This is very useful for drawing paths. For more detailed requirements about movement, you can enlarge it before drawing.

• 2. Pencil tool

Click the pencil icon in the left toolbar. This is a straight line tool. Click on any point with left mouse botton on the graph, then move the mouse, there will appear a red straight line. Move the mouse to the end position you want and click the left mouse button, a straight line is drawn. If you click the left button once again, then click right mouse button to cancel this drawing.

• 3. Eraser tool

Click the Eraser tool on the left toolbar, then click the left mouse button and drag to erase the points drawn previously.

• 4. Curve tool

Click the curve tool on the left toolbar, click the left mouse button at the beginning of the curve, and then click it in the middle of the curvea and the endpoint of the curve respectively. Such a curve is drawn.

• 5. Remove tool

If you want to delete the points you drawn previously in a wide range, you can use this removal tool. Click on the delete tool on the left toolbar, and then put left mouse click on the starting point of the deletion, at this moment, you can see a rectangle always moves with the mouse. Click the left mouse button again to delete the area selected by rectangle. Right click to cancel the selection.

You can draw the inspection trajectory of the robot with those tools. It should be noted that you draw the line (blue dot) along the original trajectory as much as possible to ensure that the path is smooth during the movement. You can see the terrain roughly from the green point on the map, and then draw the points allowed by the range of motion based on this information. For service robot, mode trajectory is connected.

### 3.3.b Set target point

With respect to the application scenarios of service robot, the robot needs to move back and forth between several fixed positions. For example, from the kitchen to the first table, then back to the kitchen to the second table and so on. The following work is to mark the location of each target point on the route map drawn above. We can send the corresponding target point to the robot, and then let the robot go to the target point automatically.

Click on to activate the inspection site insertion tool, and click on the inspection trajectory in order to insert inspection sites. Inspection sites can be deleted by erasing and deleting tools.

Enter the corresponding target point number in the currently selected navigation point below, and the corresponding target point will be displayed in green in the figure. We can know the serial number of each target point in this way.

### 3.3.c Save the trajectory and upload

Click the button "Save Path" on the interface, enter the file name, and click "Save".

Draw the planning path and target point

## 3.4 Openning and closing of autonomous inspection

Open the control terminal software and click the button "Not Connected" to connect with the chassis. Waiting for the map download to complete, the client loads a few sections drawn navigation map and path site automatically.

Control the robot remotelyled to the position where it can be tracked. Of course, the robot must be in the inspection path and its facing orientation should be the same as the map you have created.

Click the button "Start navigation" to start the automatic inspection, wait 30 seconds or so for the robot to start to move autonomously, and the blue blocks that indicate the location of the robot in the interface begin to be updated synchronously.

If you want to stop the inspection, click on the button "Stop Service".

If the robot suddenly stops moving during the autonomous inspection process, and the visual status becomes “lost”, which means that the vision system loses the targets. The reasons for that may be the following: (1) The initial movement direction of the robot is opposite to the movement direction when the map is established; (2) the light intensity or the environment has changed tremendously. For reason (1), please restart the robot after turn it around. For reason (2), you need to re-esablish the map and planning path.

The full demo video of this section:

Openning and closing of autonomous inspection

In case of emergency, please press the red switch manually on the trolley to stop it.

## 3.5 Map Management and Updates

In the map management control panel，we provide map management functions which include map deletion, update and save as.

### 3.5.1 Update map

In actual use, the environment may change a lot, which results in the map established previously can no longer be tracked. In this moment, you can use the function of updating map. First select the map to be updated in the left menu , then click the button “Update Map”.

The robot may not be able to trace after turning on the updating function. At this time, you can remotely control the robot to a place where environment changes a little , then the robot can track the environment. The subsequent operation is the same as the process of establishing a map. When the map updating is completed, please click the button“Save As “firstly. Then you need to enter the name of the new map and wait for the save to complete. If you feel that the new map is of good quality, you can click the button “End Update” to end the map update process. The newly updated map can be seen in the map drop-down menu. After that, you can use the new map to navigate.

### 3.5.2 Delete map

Select the name of map in the first drop-down menu. Click the button “delete “ on the right to delete the map.

Robot map management


text:
# Numerical Analysis MCQs 01

NA MCQs 01 consist of 68 multiple choice questions. These multiples are very important for all kinds of tests. So attempt these questions to get better results.

This page consist of mcq on numerical methods with answers , mcq on bisection method, numerical methods objective, multiple choice questions on interpolation, mcq on mathematical methods of physics, multiple choice questions on , ,trapezoidal rule , computer oriented statistical methods mcq and mcqs of gaussian elimination method
We study Numerical Analysis for the preparation of mathematics for the purpose of M.Phil Math, P.hD math, EDUCATORS, LECTURER, SS, SSS, PPSC, FPSC tests. our team try ourselves best to touch every topic of Numerical Analysis to provide concept at all.

Note: You can also give valuable suggestions for the improvements of this subject.

1. By using False position 2nd approximation of $\dpi{120}&space;\small&space;x^2-x-1=0$ is

2. The roots of equation $\dpi{120}&space;\small&space;x^3-x-9=0$ near x= 2 correct to three decimal places by using Newton-Raphson method

3. If $\dpi{120}&space;\small&space;f(x_n).f(x_{n-1})<0,$ then compute New iteration $\dpi{120}&space;\small&space;x_{n+1}$ when lies b/w

4. The Approximate value of $\dpi{120}&space;\small&space;\int_{0}^{1}&space;x^3&space;dx$ when n=3 using Trapezoidal rule is

5. In Simpson’s 1/3 rule , curve of y= f(x) is considered to be a

6. The number of significant digits in 8.00312

7. The fixed point iteration method defined as $\dpi{120}&space;\small&space;x_{n+1}=g(x_n)$ converges if

8. Using bisection method , the real roots of $\dpi{120}&space;\small&space;x^3&space;-9x+1=0$ between x=2 and x=4 is near to

9. Newton Raphson Formula is derived from

10. The method of false position is also known as

11. To find the roots of equation f(x) , Newton’s Iterative formula is

12. The number of significant figures in 48.710000

13. The rate of convergence of secant method is

14. The Newton-Raphson method  fails if in the neighborhood of root

15. In simpson 1/3 rule, if the interval is reduced by 1/3 rd then the truncation error is reduced to

16. Which of the following is iterative method

17. Method of factorization is also known as

18. The order of convergence of iteration method is

19. The smallest +ve root of $\dpi{120}&space;\small&space;x^3-5x+3=0$  lies between

20. Which of the following is the modification of Guass Elimination method

21. The equation $\dpi{120}&space;\small&space;x^3&space;-&space;log_{10}x&space;+&space;sin&space;x&space;=0$ is known as

22. Relaxation method is known as

23. To solve $\dpi{120}&space;\small&space;x^3&space;-x-9=0$  for x near 2 ,with Newton’s method, the correct answer up to three decimal places is

24. Simpson’s rule was exact when applied to any polynomial of

25. The number of significant figures in 0.021444 is

26. By solving $\dpi{120}&space;\small&space;x^2-2x-4=0$ for x near 3 using iterative process , the correct answer up to three decimal places is

27. The % error in approximating $\dpi{120}&space;\small&space;\frac{4}{3}$ by 1.33 is ________%

28. To evaluate $\dpi{120}&space;\small&space;\int_{0}^{1}&space;f(x)&space;dx$ approximately  which of the following method is used  when the value of f(x) is given only at $\dpi{120}&space;\small&space;x=0,\frac{1}{3},\frac{2}{3},&space;0$

29. The root of $\dpi{120}&space;\small&space;x^4&space;-x-10=0$ by using Newton-Raphson 2nd approximation correct answer up to three decimal places is

30. The formula $\dpi{120}&space;\small&space;\int_{x_o}^{x_o&space;+&space;nh}&space;f(x)dx=h[ny_o+\frac{n^2}{2}\Delta&space;y_o+\frac{1}{2}(\frac{n^3}{3}-\frac{n^2}{2})\Delta^2&space;y_o+&space;\frac{1}{6}(\frac{n^4}{4}-n^3+n^2)\Delta^2&space;y_o+...]$ is known as

31. Newton’s method has ____________ convergence

32. The rate of convergence of Guass-Seidal is twice that of

33. By using False position method , the 2nd approximation of root of f(x)=0 is

34. The symbol used for average operator

35. The error in Simpson’s 1/3 rule is of order of

36. which method is known as Regula-Falsi method

37. Newton’s method fails to find the root of f(x)=0 if

38. The False position 2nd approximation of $\dpi{120}&space;\small&space;x^3-9x+1=0$ between 2 and 4 is

39. By using Newton-Raphson method to solve $\dpi{120}&space;\small&space;\sqrt{12}$, the correct answer up to three decimal places is

40. The error in Simpson’s rule when approximating $\dpi{120}&space;\small&space;\int_{1}^{3}&space;\frac{dx}{x}$ is less than

41. Gauss- Serial iterative method is used to solve

42. The fixed iterative method has ________ converges

43. Every square matrix can be expressed as product of lower triangular and unit upper triangular matrix _________ method based on this fact

44.

1. If $\dpi{120}&space;\small&space;\frac{5}{6}$ ≅ 0.8333 then percentage error is __________ %

45. Numerical solutions of linear algebraic equations can be obtained by

46. Bisection method is also known as

47. The rate of convergence of bisection method is

48. The symbol used for shift operator

49. By using iterative process  $\dpi{120}&space;\small&space;x_{n+1}=\frac{1}{2}(x_n&space;+&space;\frac{N}{x_n}),$ the positive root of 278 to five significant figures is

50. $\dpi{120}&space;\small&space;sin&space;x&space;+&space;e^x$ is

51. By using Simpson’s rule, the value of integral $\dpi{120}&space;\small&space;\int_{0}^{1}&space;\frac{1}{1+x^2}dx$=

52. The Regula False method is somewhat similar to

53. The value of $\dpi{120}&space;\small&space;\int_{1}^{10}&space;x^2$ using Trapezoidal rule is

54. Round off error occurers when 2.987654 is rounded off up to 5 significant digits is

55. Relative error = ?

56. To find the root of equation f(x)=0  in (a,b) , the false position method is given as

57. The equation $\dpi{120}&space;\small&space;x^2&space;+3x+1=0$ is known as

58. By using Newton-Raphson method  the root b/w 0 and 1  by first approx. of $\dpi{120}&space;\small&space;x^3-6x+4=0$ is

59. The symbol used for  forward diffefence operator is

60. The method of successive approximation is known as

61. By v using iterative process $\dpi{120}&space;\small&space;x_{n+1}=\frac{1}{2}(x_o&space;+&space;\frac{N}{x_n}),$ the positive square root of 102 correct to four decimal places is

62. Newton-Raphson method to solve equation having formula

63. The symbol used for backward difference operator

64. The process of convergence in iterative method is faster than in

65. Which of the followong is modefication of Guass-Jocobi method

66. To solve $\dpi{120}&space;\small&space;x^2&space;-&space;x&space;-2=0$ by Newton-Raphson method  we choose $\dpi{120}&space;\small&space;x_o=1$, then value of $\dpi{120}&space;\small&space;x_2$ is

67. The error in Trapezoidal rule is of order of

68. Sum of roots of equation $\dpi{120}&space;\small&space;x^3&space;-&space;7x^2+14x-8=0$ is

## 7 Replies to “Numerical Analysis MCQs 01”

1. Dawood israr says:

This is very good and informative for the students and i need all the MCQS and topics of INTER and engineering because i am the student of civil engineering..Thanks

Dead Dawood israr , Very soon we shall provide inter mcqs and its video lectures.
thank you for contacting us.

Very informative

3. Hi. I have checked your pakmath.com and i see you’ve
got some duplicate content so probably it is the reason that you don’t rank high in google.
But you can fix this issue fast. There is a tool
that creates articles like human, just search in google:
miftolo’s tools

4. Sarang Bhalerao says:

tomorrow is my uni exam.i hope i get questions among this only.this questions got relief to me..super thanksss

5. Rabia mushtaq says:

Ans plz send krain

format: plain


text:
Energy Excursions

# Direct Air Capture in Texas

#### Texas Leads the Way on Direct Air Capture in the Permian Basin

In 2019 Occidental became one of the first major oil companies to invest in developing direct air capture (DAC) factories. The company invested in Carbon Engineering, a Canadian business that developed a DAC pilot plant outside of Vancouver. Together, the companies have begun the engineering and design work of the world’s largest DAC and sequestration facility, located in the Permian Basin with a land footprint of approximately 100 acres, rumored to be in Ector County (home of Odessa). Construction on the facility is expected to start in 2022 with the possibility of creating 1,000 jobs.1Globe Newswire. (2020, August 19). Oxy Low Carbon Ventures, Rusheen Capital Management create development company 1PointFive to deploy Carbon Engineering’s Direct Air Capture technology. Retrieved November 3, 2020, from https://www.globenewswire.com/news-release/2020/08/19/2080502/0/en/Oxy-Low-Carbon-Ventures-Rusheen-Capital-Management-create-development-company-1PointFive-to-deploy-Carbon-Engineering-s-Direct-Air-Capture-technology.html2Blum, J. (2019, May 21). Oxy moves forward on Permian ‘direct air capture’ plant. Houston Chronicle. Retrieved November 3, 2020, from https://www.chron.com/business/energy/article/Oxy-moves-forward-on-Permian-direct-air-capture-13867251.php

Rendering of Occidental’s Direct Air Capture Facility in the Permian Basin (construction 2022)

When operational, the facility will be the largest DAC plant in the world, capturing up to one Mt of atmospheric CO2 annually. Currently, the world’s largest individual DAC facilities have the capacity to capture several thousand tonnes of CO2 per year. The CO2 captured (500,000 t/yr) at the facility will be stored by Occidental in the subsurface using two methods. First, Occidental will use the CO2 as part of their enhanced recovery program in the Permian. The company uses 50 Mt of CO2 annually for enhanced recovery, which permanently stores CO2 as part of the process. Second, geologic sequestration will deliver permanent CO2 removal. Occidental plans to use these two methods to help achieve their ultimate goal: to put more CO2 into the ground than it takes out in the form of fossil fuels. Partnerships on commercial development of DAC facilities has been made possible by market-based policies in the U.S., such as the California Low Carbon Fuel Standard and Federal 45Q tax credit.3Globe Newswire. (2020, August 19). Oxy Low Carbon Ventures, Rusheen Capital Management create development company 1PointFive to deploy Carbon Engineering’s Direct Air Capture technology. Retrieved November 3, 2020, from https://www.globenewswire.com/news-release/2020/08/19/2080502/0/en/Oxy-Low-Carbon-Ventures-Rusheen-Capital-Management-create-development-company-1PointFive-to-deploy-Carbon-Engineering-s-Direct-Air-Capture-technology.html4Blum, J. (2019, May 21). Oxy moves forward on Permian ‘direct air capture’ plant. Houston Chronicle. Retrieved November 3, 2020, from https://www.chron.com/business/energy/article/Oxy-moves-forward-on-Permian-direct-air-capture-13867251.php

## Ethanol production

#### Correct.

An industrial process such as ethanol production produces highly concentrated CO2 streams. Average costs are \$15-25/t.

## Cement production

#### Incorrect.

Gas streams from cement production produce more dilute CO2 streams.


text:
MathSciNet bibliographic data MR234273 (38 #2590) 46.25 (57.00) Wells, John Differentiable functions on \$c\sb{0}\$$c\sb{0}$. Bull. Amer. Math. Soc. 75 1969 117–118. Article

For users without a MathSciNet license , Relay Station allows linking from MR numbers in online mathematical literature directly to electronic journals and original articles. Subscribers receive the added value of full MathSciNet reviews.


text:
# How to find the time complexity of an MLE based algorithm

How to calculate or what is the time complexity (big-Oh) for this method?

Based on my understanding, MLE depends on number of datapoints, $$N$$ so time complexity for MLE is O(N). However, there are some computations involved while calculating the log-likelihood such as multiplication, optimization. Do we include for these steps?

The complexity will depend on the method being used to calculate the MLE. For example, the MLE for the mean of a Bernoulli distribution is just the sample mean, which can be calculated in $$O(N)$$ (assuming that each arithmetical operation takes effectively constant time).


text:
# Enabling Persistent Memory in the Storage Performance Development Kit (SPDK)

Published: 07/25/2019

Last Updated: 07/25/2019

## Introduction

With the development of new storage technologies and accompanying expectations of higher performance, the industry has begun to look at migration toward memory channels for possibilities.

A new direction in storage technology that offers expectations of higher performance is the non-volatile dual in-line memory module (NVDIMM).

NVDIMM is memory that is nonvolatile and allows for random access. Nonvolatile means that data is kept even without power, so during unexpected power loss, system crashes, and normal shutdowns we will not experience data loss. At the same time, NVDIMM uses a dual in-line memory module (DIMM) package compatible with a standard DIMM slot, and communicates through a standard double data rate (DDR) bus. Considering the fact that it is nonvolatile and compatible with a traditional dynamic random-access memory (DRAM) interface, it is also called persistent memory (PMEM).

## Types

According to the definition provided by the standardization body JEDEC, there are at present three types of NVDIMM, which are described as follows.

### NVDIMM-N

NVDIMM-N includes flash memory and traditional DRAM in one module, to which computers have direct access, and supports both byte and block addressing. Following an unexpected power loss, the NVDIMM-N backup power source can provide sufficient power to copy data from DRAM to flash memory, and when power is restored the data can be reloaded into DRAM.

Figure 1. An NVDIMM-N.

In fact, NVDIMM-N primarily works like traditional DRAM, and that is why its delay also happens at the level of 10-8 seconds. As for its capacity, constrained by size, NVDIMM-N sees limited improvement over traditional DRAM.

One drawback is that the NVDIMM-N flash is not addressable, and another is that the use of two media types greatly increases its cost. However, NVDIMM-N has impressed the industry with its new concept of persistent memory. Currently, there are many NVDIMM-N based products on the market.

### NVDIMM-F

NVDIMM-F is flash memory and uses the DDR3 or DDR4 bus of DRAM while, as we know, a solid-state drive (SSD) with NAND flash as a medium generally uses Serial Advanced Technology Attachment (SATA), Serial Attached SCSI (SAS), or PCIe* bus. The use of the DDR bus can improve the maximum bandwidth and reduce to a certain extent the delay and cost caused by the protocol, but it only supports block addressing.

NVDIMM-F works essentially the same as an SSD, and that is why its delay is at the level of 10-5 seconds. Its capacity can easily expand to terabytes (TB).

### NVDIMM-P

The standard related to this type is currently under development. It is expected to come out together with the DDR5 standard. According to the release plan, DDR5 will provide a bandwidth that is twice that of DDR4, and improves the channel efficiency. For NVDIMM-P, these expected improvements, combined with its user-friendly interfaces for server and client platforms, enables high-performance and improved power management in applications.

NVDIMM-P combines the features of DRAM and flash, supporting both block addressing and traditional DRAM-like byte addressing, with a possible terabyte capacity, like NAND flash. In addition, it can keep the delay within the level of 10-7 seconds.

With data media connected straight to the memory bus, a CPU can access the data directly, without drive or PCIe latency. At the same time, instead of requiring block access, the CPU can access only the data it needs because memory access is through a cache line of 64 bytes.

Intel Corporation released Intel® Optane™ DC persistent memory in April 2019. It can be seen as an instance of an NVDIMM-P implementation.

Figure 2. Intel® Optane™ DC persistent memory.

## Hardware Support

Applications can directly access NVDIMM-P in the same way they access traditional DRAM, which also saves the need for page swapping between traditional block devices and memory. However, writing data to persistent memory and writing data to ordinary DRAM shares computer resources including processor buffers, L1/L2 cache, and so on.

It should be noted that in order to make the data persistent, the data should be written to the persistent memory device or the buffer with power loss protection. If software wants to make full use of the features of persistent memory, the instruction set architecture needs to support at least the following features.

### Atomicity of Writing

Atomicity means that writes of any size to persistent memory should be atomic because this can prevent erroneous data or duplicative writing caused by a system crash or unexpected power loss. IA-32 (IA32) and IA-64 (IA64) processors can guarantee atomic writing of data access (aligned or unaligned) to cache data up to 64 bits; therefore, software can safely update data in persistent memory. This also improves performance, for it avoids the use of copy-on-write or write-ahead-logging, which is used to ensure write atomicity.

### Efficient Cache Flushing

For performance reasons, the data in persistent memory must be put into the processor cache before being accessed. An optimized cache flushing instruction can reduce flushing's (CLFLUSH) impact on performance.

CLFLUSHOPT provides more efficient cache flush instructions.

The cache line write back (CLWB) instruction writes the data that are altered on the cache line back to memory (similar to CLFLUSHOPT), with no need to turn this cache line to invalid (MESI protocol), but instead into the unaltered Exclusive state. CLWB is actually trying to reduce the inevitable cache miss in the next access due to the flushing of certain cache lines.

### Committing to Persistence

Within the architecture of modern computers, upon the completion of cache flushing, the modified data is written back to the write buffer of the memory subsystem. However, under this circumstance, the data is not persistent. To ensure that data is written to persistent memory, software needs to flush volatile write buffers or other caches in the memory subsystem. The commit instruction, PCOMMIT, for persistent writes can commit the data in the write queue of the memory subsystem to persistent memory.

(Notes: Platforms that support  Intel® Optane™ DC persistent memory are also required to support Asynchronous DRAM Refresh (ADR). This feature guarantees data persistence during power-fail or shutdowns by flushing the Write Pending Queue (WPQ ) in the memory controller automatically, eliminating the need for PCOMMIT. For more information, please refer to Deprecating the PCOMMIT Instruction)

### Non-temporal Store Optimization

When software needs to copy a large amount of data from ordinary memory to persistent memory (or between persistent memories), weak order, non-temporary store operation (for example, MOVNTI) instructions are available options. Because non-temporal store instructions can implicitly invalidate the cache line to be written back, software does not need to explicitly flush the cache line (see Section 10.4.6.2. of the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1).

The above introduces several ways of implementing NVDIMM, as well as the hardware optimization and support, to give full play to the performance of NVDIMM-P. The following section is about software support, including programming model, programming library, Storage Performance Development Kit (SPDK) support, and so on.

## Software Support

This section is about the support software can provide to fully enable NVDIMM features. Some might wonder why NVDIMM does not appear as convenient as the name suggests; for persistent memory is still far away from the ideal usage scenario of restarting a computer with everything remaining the same as it was when last shut down. In fact, this will still be difficult to achieve in the near future because, on top of DRAM for example, cache and registers remain volatile. Persistent memory alone cannot make everything persistent. There is another problem: memory leaks. If a memory leak happens, a restart will clear volatile memory, but what about a persistent memory leak? This is a tough situation. PMEM is similar to memory in some respects and to storage in others; however, generally, we do not take PMEM as something able to replace memory or storage. In fact, it can be regarded as a supplement to fill the huge gap between memory and storage.

SPDK has included support PMEM since the 17.10 release. PMEM is exposed as a block device in the bdev layer of the SPDK and communicates with the upper layer through a block device interface, as shown in Figure 3.

Figure 3. PMEM support in SPDK.

From the figure, we can see that libpmemblk turns a block operation into a byte operation, but how does it achieve this? Let us take a look at the basics before delving into libpmemblk and the underlying Persistent Memory Development Kit (PMDK).

### Mmap and DAX

Let us first take a look at traditional I/O; that is, buffered I/O. Most operating systems use cache I/O by default, which allows I/O data to be cached in the operating system page cache, meaning that data is first copied to the operating system kernel space buffer and from there to the specified user address space.

// A Programmer’s view (not just C programmers!)
fd = open(”/my/file”, O_RDWR);
…
…
count = write(fd, buf, bufsize);
…
close(fd);
// “Buffer-Based”

In Linux*, this file access technique is realized through read/write system calls, as shown in Figure 4. Next, in contrast, we see how memory mapped I/O mmap () works.

// A Programmer’s view (mapped files)
fd = open(”/my/file”, O_RDWR);
…
MAP_SHARED, fd, 0);
close(fd);
…
base[100] = ’X’;
strcpy(base, ”hello there”);
*structp = *base_structp;
…

We can get a pointer to the corresponding file through mmap, and then assign a value or execute memcpy/strcpy just as how we operate in memory. We call this process a load/store operation, and it generally requires calls to msync and fsync to persist data.

What mmap does can be regarded as directly copying files to user space, saving one copy of data because it establishes mapping between files and user space. However, mmap still relies on page cache.

Figure 4. Load/store still needing page cache.

Now, what is DAX? DAX, meaning direct access, is a mmap-based feature. But it is different from mmap in its complete independence from the page cache and its direct access to storage devices. That makes it a good fit for NVDIMM. The application's file operations on mmap are directly synchronized to NVDIMM. DAX is now supported on XFS, EXT4, and Windows* NTFS, but its use requires some modification on the application or file system.

Figure 5. DAX.

### NVM Programming Model

The non-volatile memory (NVM) Programming Model roughly defines three ways to use persistent memory.

Figure 6. NVM Programming Model.

• Management, as shown on the left of Figure 6, mainly manages NVDIMMs through an API provided by the driver, such as capacity checks, health status, firmware version, firmware upgrade, mode configuration, and so on.
• The middle part of Figure 6 shows usage as a storage block device. The file system and kernel that support the NVDIMM driver are used. The application program does not need to make any modifications and accesses NVDIMM through a standard file interface.
• The third way to use it is based on the DAX features of the file system; it operates through load/store, and synchronously persists data with no need for a page cache. Moreover, there are no system calls or interrupts involved. These feature the core of the NVM Programming Model, maximizing NVIDMM’s potential features. But the downside is that the application may need to make some changes.

### Persistent Memory Development Kit (PMDK)

libpmemblk implements an array of blocks of the same size residing in persistent memory. Each block in it remains atomic transactionality for sudden power loss, program crashes, and so on. It is based on the libpmem library.

libpmem is a low level library provided by the PMDK, for flushing and persisting data in NVDIMM. It can track every store operation on PMEM and ensure that the data is made persistent.

## Real Use in SPDK–Bdevperf Test

bdevperf is a tool provided in SPDK for performance evaluation. Users can enable various kinds of block device in SPDK bdev layer and run bdevperf test.

### STEP 1. Create a PMEM bdev

Clone or download a repo and step in to the directory of SPDK.

   ./configure --with-pmdk
make

PMDK has been included in some newly released versions of Linux. If there happen to be errors in configuration, visit the GitHub* site to install the PMDK library.

First, we need to run an SPDK target. SPDK provides several targets for different usage, for example, ISCSI target, NVMF target, vhost target, etc. Here we run a simple target spdk_tgt only for receiving and parsing RPC commands:

./app/spdk_tgt/spdk_tgt

Next, we can create a pmem_pool through the SPDK RPC command:

rpc.py create_pmem_pool /path/to/pmem_pool  (MB) > <BlockSize>

If we do not have a real NVDIMM to test here, we can just choose a random path of pmem_pool (for simulation); for example:

rpc.py create_pmem_pool /mnt/pmem  128  4096

If you have Intel Optane DC persistent memory in the system, you can refer to the Quick Start Guide: Configure Intel® Optane™ DC Persistent Memory on Linux* for configuration. After configuration, just use the mount directory as the path of pmem_pool.

We can also use pmem_pool_info to obtain information needed to create a pmem_pool:

rpc.py pmem_pool_info /path/to/pmem_pool

Or, we can delete the pmem_pool just created:

rpc.py delete_pmem_pool /path/to/pmem_pool

Then, we set up a bdev block device on the pmem_pool we created:

rpc.py construct_pmem_bdev /path/to/pmem_pool -n pmem_bdev_name

### Step 2. Update the Configuration File

Change path to spdk/test/bdev/bdev.conf.in, and only keep part of the PMEM configuration.

[Pmem]
Blk <pmemblk pool file name> <bdev name>

For example:

[Pmem]
Blk  /mnt/pmem-pool  pmem-bdev

### Step 3. bdevperf Test

./bdevperf -c ../bdev.conf.in -q <iodepth> -t <time> -w <io pattern type: write|read|randwrite|randread>-o <io size in bytes>

Example command:

./bdevperf -c ../bdev.conf.in -q 128 -t 100 -w write -o 4096
./bdevperf -c ../bdev.conf.in -q 128 -t 100 -w write -o 4096

## Conclusion

In this article, we’ve described the differences between hardware and software for NVDIMM as storage. Intel Corporation released Intel® Optane™ DC persistent memory in April of 2019, making NVDIMM the focus of the industry.

## References

Intel® Architecture Instruction Set Extensions Programming Reference

pmem.io

spdk.io

Joint Electron Tube Engineering Council (JETEC) technology focus area on Main Memory: DDR4 & DDR5 SDRAM

Operating Modes of Intel® Optane™ DC Persistent Memory


text:
1. ## pascals triangle

trying to prove that all the elements in a row of pascals triangle are odd if and only if n=2^k -1

I wrote out the rows mod 2 but i dont see how that leads me to a proof of this.. im missing some piece of the idea

2. 1) Rather screaming for induction, isn't it?
2) For k = 0, we have n = 0. Is that the first row? 1 - yup, odd only
3) For k = 1, we have n = 1. 1, 1 - yup, odd only.
4) For k = 2, we have n = 3. Can you get here from there?

3. To prove this claim by induction, we need to connect the ( $2^n-1$)th and ( $2^{n+1}-1$)th rows. It is not immediately clear how to do this, e.g., how to produce the latter from the former. Alternatively, if we use Pascal's rule ${n-1\choose k} + {n-1\choose k-1} = {n\choose k}$, then we cannot limit the claim only to rows number $2^n-1$; the claim has to be strengthened to describe each row in such a way that it would still imply the required conclusion for rows number $2^n-1$.

This is very much like loop invariants in programming. We may know what we would like the loop to produce in the end. However, to prove that it does so, we have to describe not only the desired final result, but also each intermediate iteration. This description has to make clear why it is preserved from one iteration to the next and why it implies the final result. Such strengthening of the induction hypothesis is ubiquitous in many areas of discrete mathematics.

Wikipedia says that Pascal's triangle resembles Sierpinski triangle. (They become the same only in the limit because Pascal's triangle grows infinitely in size while Sierpinski triangle grows infinitely in depth, so to speak.)

In this picture, I denote even numbers by 0 and odd numbers by 1. Suppose that we have the top part of the triangle that ends in a row of 1's. Then the triangle of twice the height is obtained by making two copies of the top triangle and filling the middle with 0's. Indeed, the row after all 1's will be 1 0 0 ... 0 0 1. It is easy to see that in the bottom left triangle, there is a growing diagonal (i.e., the right side) of 1's that goes down and right. Therefore, the bottom left triangle will be a copy of the top one. A similar thing happens to the bottom right triangle. There won't be another row of all 1's until the two bottom triangles are completed.


text:
# zbMATH — the first resource for mathematics

The Vietoris-Rips complexes of a circle. (English) Zbl 1366.05124
Summary: Given a metric space $$X$$ and a distance threshold $$r>0$$, the Vietoris-Rips simplicial complex has as its simplices the finite subsets of $$X$$ of diameter less than $$r$$. A theorem of Jean-Claude Hausmann states that if $$X$$ is a Riemannian manifold and $$r$$ is sufficiently small, then the Vietoris-Rips complex is homotopy equivalent to the original manifold. Little is known about the behavior of Vietoris-Rips complexes for larger values of $$r$$, even though these complexes arise naturally in applications using persistent homology. We show that as $$r$$ increases, the Vietoris-Rips complex of the circle obtains the homotopy types of the circle, the 3-sphere, the 5-sphere, the 7-sphere, etc., until finally it is contractible. As our main tool we introduce a directed graph invariant, the winding fraction, which in some sense is dual to the circular chromatic number. Using the winding fraction we classify the homotopy types of the Vietoris-Rips complex of an arbitrary (possibly infinite) subset of the circle, and we study the expected homotopy type of the Vietoris-Rips complex of a uniformly random sample from the circle. Moreover, we show that as the distance parameter increases, the ambient Čech complex of the circle (i.e., the nerve complex of the covering of a circle by all arcs of a fixed length) also obtains the homotopy types of the circle, the 3-sphere, the 5-sphere, the 7-sphere, etc., until finally it is contractible.

##### MSC:
 05E45 Combinatorial aspects of simplicial complexes 55U10 Simplicial sets and complexes in algebraic topology
Full Text:
##### References:
 [1] doi:10.1007/s11856-012-0166-1 · Zbl 1275.05041 [2] doi:10.1007/s00454-016-9803-5 · Zbl 1354.05149 [3] doi:10.1016/j.aam.2016.08.007 · Zbl 1379.37011 [4] doi:10.1016/j.jcta.2011.06.008 · Zbl 1234.05237 [5] ; Björner, Handbook of combinatorics, II, 1819, (1995) [6] doi:10.1090/S0273-0979-09-01249-X · Zbl 1172.62002 [7] doi:10.1007/s00454-009-9209-8 · Zbl 1231.05306 [8] doi:10.1007/s10711-013-9937-z · Zbl 1320.55003 [9] doi:10.1007/978-1-4613-9586-7_3 [10] ; Hausmann, Prospects in topology. Ann. of Math. Stud., 138, 175, (1995) [11] doi:10.1073/pnas.2.11.630 [12] doi:10.7151/dmgt.1424 · Zbl 1173.05041 [13] doi:10.1016/j.disc.2008.02.037 · Zbl 1215.05163 [14] doi:10.1016/S0021-9800(67)80075-9 [15] doi:10.1007/978-3-540-71962-5 [16] doi:10.1007/PL00000526 · Zbl 1001.53026 [17] doi:10.1016/j.disc.2008.04.003 · Zbl 1228.05218 [18] ; Matoušek, Contrib. Discrete Math., 3, 37, (2008) [19] ; Solomon, Geometric probability. Regional Conf. Series in Appl. Math., 28, (1978) [20] doi:10.1007/BF01447877 · JFM 53.0552.01 [21] doi:10.1515/crll.1999.035 · Zbl 0995.55004
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.


text:
# GATE2012-29

In an exponentially growing batch culture of $\text{Saccharormyces cerevisiae}$, the cell density is 20 ${gl^{-1}}$ (DCW), the specific growth rate ($\mu$) is 0.4 ${h^{-1}}$ and substrate uptake rate (v) 1s 16 $gl^{-1}h^{-1}$. The cell yield coefficient $Y_{x/9}$, will be

1. 0.32
2. 0.64
3. 0.80
4. 0.50
in Others
edited

## Related questions

1
$\beta$-Galactosidase bound to DEAE-cellulose is used to hydrolyze lactose to glucose and galactose in a plug flow bioreactor with a packed bed of volume $100$ liters and a voidage ($\epsilon$) of $0.55$. The $K'_m$ and $V'_m$; for the immobilized enzyme are $0.72 \: gl^{-1}$ ... for the above bioconversion will be $50 \: lh^{-1}$ $55 \: lh^{-1}$ $137 \: lh^{-1}$ $550 \: lh^{-1}$
2
$\beta$-Galactosidase bound to DEAE-cellulose is used to hydrolyze lactose to glucose and galactose in a plug flow bioreactor with a packed bed of volume $100$ liters and a voidage ($\epsilon$) of $0.55$. The $K'_m$ and $V'_m$; for the immobilized enzyme are $0.72 \: gl^{-1}$ ... time required for the steady state reactor operation will be $0.1 \: h$ $0.4 \: h$ $1.0 \: h$ $1.1 \: h$
$\text{Statement for Linked Answer Questions 52 and 53:}$ An E $coli$ cell of volume $10^{-12}$ $cm^3$ contains 60 molecules of lac-repressor. The repressor has a binding affinity (${K_d}$) of $10^{-8}$ M and $10^{-9}$ M ... lac-operon is repressed and can only be induced with lactose repressed and cannot be induced with lactose not repressed expressed only when glucose and lactose are present
$\text{Statement for Linked Answer Questions 52 and 53:}$ An E $coli$ cell of volume $10^{-12}$ $cm^3$ contains 60 molecules of lac-repressor. The repressor has a binding affinity (${K_d}$) of $10^{-8}$ M and $10^{-9}$ M with and without lactose respectively, in the medium The molar concentration of the repressor in the cell 15 $\text{0.1 nM}$ $\text{1 nM}$ $\text{10 nM}$ $\text{100 nM}$
Answer the question based on the information given below: The purification data for an enzyme is given below: ... $\text{P-3.4, Q-2.4, R-1.5, S-0.1}$ $\text{P-100, Q-71, R-44, S-29}$


text:
# Simple question on disproving a group isomorphism

1. Jul 27, 2008

### jeffreydk

I am trying to prove that the additive groups $\mathbb{Z}$ and $\mathbb{Q}$ are not isomorphic. I know it is not enough to show that there are maps such as, [tex]f:\mathbb{Q}\rightarrow \mathbb{Z}[/itex] where the input of the function, some $f(x=\frac{a}{b})$, will not be in the group of integers because it's obviously coming from rationals. I just don't know how to rigorously prove this, because just because a map is not isomorphic doesn't mean that the whole thing is not isomorphic. Thanks for any help, it is much appreciated.

2. Jul 27, 2008

### morphism

Suppose we managed to find an isomorphism $f:\mathbb{Q}\rightarrow \mathbb{Z}$. Then f(1/2) would be an integer; what happens when you look at f(1/2) + f(1/2)?

3. Jul 27, 2008

### jeffreydk

It would still be in integers right? That's why I'm confused because I can't seem to show that that property disallows the isomorphism.

4. Jul 27, 2008

### n_bourbaki

Morphism is sort of on the right lines. The property that you're looking for is called divisibility. Q has it and Z doesn't. The same idea also shows that Q\{0} under multiplication is not isomorphic to R\{0} under multiplication. (One can provide an elementary counter argument based purely on set theory, of course.)

Alternatively, Z is cyclic. Can you prove that Q isn't? Actually it isn't that alternative, really. Try thinking about a map g from Z to Q. Any group hom is determined completely by where it sends 1 in Z. Can g(1)/2 be in the image?

Last edited: Jul 27, 2008
5. Jul 27, 2008

### jeffreydk

Oh ok I didn't think of showing Q isn't cyclic, that's probably the simplest way to do it now that I think of it. Thanks a bunch.

6. Jul 27, 2008

### morphism

Since the "cat is out of the bag," I might as well point out that I wanted jeffreydk to notice that f(1)=nf(1/n) for all n (and why is this bad?).

7. Jul 27, 2008

### n_bourbaki

So your proof is based on the idea that if there is an isomorphism f:Q-->Z, then it must follow that f(1) is divisible by every integer? Hmm, not thought of that one before. It struck me as more obvious that Q isn't cyclic, i.e. look at maps from Z to Q. But it's always good to be able to do one thing in two ways, rather than two things in one way.

8. Jul 27, 2008

### jeffreydk

I definitely agree, it's good to able to prove it in a number of ways. Thanks you guys for both suggestions.


text:
## Physics & Astronomy ETDs

Fall 11-10-2017

#### Abstract

The Bragg peak geometry of the depth dose distributions for hadrons allows for precise and effective dose delivery to tumors while sparing neighboring healthy tissue. Further, compared against other forms of radiotherapeutic treatments, such as electron beam therapy (EBT) or photons (x and $$\gamma$$-rays), hadrons create denser ionization events along the particle track, which induces irreparable damage to DNA, and thus are more effective at inactivating cancerous cells. The measurement of radiation's ability to inactivate cellular reproduction is the relative biological effectiveness (RBE). A quality related to the RBE that is a measurable physical property is the linear energy transfer (LET), a measurement of the deposited energy over the particle track. The purpose of this work was to develop a method of measuring LET of radiotherapeutic beams using an air-filled ionization chamber (IC) and liquid-filled ionization chamber (LIC). Through analysis of the IC and LIC signals, we determined a correlation between the recombination index (IC/LIC) and dose-averaged LET.

Physics

Doctoral

#### Department Name

Physics & Astronomy

#### First Committee Member (Chair)

Michael Holzscheiter

Shuang Luan

David Dunlap

Paul Schwoebel

English

#### Keywords

LET, HIT, Bragg Peak, Ionization Chamber, Radiotherapy

Dissertation

COinS


text:
# Urinal manual

Based on the tikz flowchart example I created my first flowchart in Latex. Creating such a flowchart with Latex is not as easy as it looks like. Sometimes you don’t get an error message even if there is an error (especially missing semicolons) in the code. In my case pdftex just hang up. One thing was a bit tricky but first have a look at my code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\begin{document}

\pagestyle{empty}

% Define block styles
\tikzstyle{decision} = [diamond, draw, fill=blue!20,
text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]

\tikzstyle{block} = [rectangle, draw, fill=blue!20,
text width=4cm, text centered, rounded corners, minimum height=4em, minimum width=4.5cm]

\tikzstyle{line} = [draw, -latex']

\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em]

\begin{tikzpicture}[node distance = 3cm, auto]
% The nodes
\node[cloud] (business) {Business};
\node[block, below of=business] (person) {i:=person};
\node[decision, below of=person] (sex) { i.sex = male ?};
\node[decision, below of=sex, node distance=4cm] (sex2) { i.sex = pre-op transsexuel female ?};

\node[block, right of=sex2, node distance=6cm] (execution_block_1) {i.enter(toilet)\\
i.open(trousers)\\
i.target(eyes, center)\\
i.target(hands, center)
};

\node[block, below of=execution_block_1] (open_bladder) { i.open(bladder) };
\node [decision, below of=open_bladder, text width=2cm] (bladder_empty) {i.bladder = empty?};

\node[block, below of=bladder_empty] (execution_block_2) { i.close(bladder)\\
i.close(trousers)\\
i.flush(urinal)
};

\node [block, below of=execution_block_2] (exit) { i.exit() };

% The connections
\path [line] (business) -- (person);
\path [line] (person) -- (sex);
\path [line] (execution_block_1) -- (open_bladder);
\path [line] (execution_block_2) -- (exit);

\path [line] (sex) -- node [near start] {no} (sex2);
\path [line] (sex) -| node [near start] {yes} (execution_block_1);
\path [line] (sex2) -- node [near start] {no} (execution_block_1);
\path [line] (sex2) |- node [near start] {yes} (exit);
\path [line] (open_bladder) -- (bladder_empty);
\path [line] (bladder_empty) -- node [near start] {yes} (execution_block_2);
\path [line] (bladder_empty) -- +(4,0) -- +(4,3) -- node [near start] {no} (open_bladder);
\end{tikzpicture}

\end{document}

The decision block with the bladder emptiness check has more than one curve. -| or |- didn’t work so the trick here is that you have to add coordinates (x,y) to the connection line where it should curve.

### 1 Comment

1. I’m amazed at how quick your blog loaded on my cell phone ..


text:
The Cauchy-Schwarz Inequality for Inner Product Spaces

# The Cauchy-Schwarz Inequality for Inner Product Spaces

 Theorem 1 (The Cauchy-Schwarz Inequality for Inner Product Spaces): Let $H$ be an inner product space. Then $|\langle x, y \rangle| \leq \langle x, x \rangle^{1/2} \langle y, y \rangle^{1/2}$ for all $x, y \in H$ where equality holds if and only if $x$ is a scalar multiple of $y$.
• Proof: Let $x, y \in H$ and consider the real-valued polynomial:
(1)
\begin{align} p(t) = \langle y, y \rangle t^2 + 2 |\langle x, y \rangle| t + \langle x, x \rangle \end{align}
• Choose $\xi \in \mathbb{C}$ with $|\xi| = 1$ so that:
(2)
\begin{align} \quad \langle x, \xi y \rangle = |\langle x, y \rangle| \end{align}
(3)
\begin{align} \quad \langle x, \xi y \rangle = \overline{\xi} \langle x, y \rangle \end{align}
• Now consider the inner product of $x + t \xi y$ with itself. We have that:
(4)
\begin{align} \quad \langle x + t \xi y, x + t \xi y \rangle &= \langle x, x \rangle + t \overline{\xi} \langle x, y \rangle + t \xi \langle y, x \rangle + t^2 \xi \overline{\xi} \langle y, y \rangle \\ &= \langle x, x \rangle + t \overline{\xi} \langle x, y \rangle + t \xi \overline{\langle x, y \rangle} + t^2 |\xi| \langle y, y \rangle \\ &= \langle x, x \rangle + 2 \mathrm{Re} (t \xi \langle y, x\rangle) + t^2 \langle y, y \rangle\\ &= \langle x, x \rangle + 2t \mathrm{Re} (\overline{\langle x, \xi y \rangle}) + t^2 \langle y, y \rangle \\ &= \langle x, x \rangle + 2t |\langle x, y \rangle| + t^2 \langle y, y \rangle \\ &= p(t) \end{align}
• By the properties of inner products, the inner product of an element with itself is always greater than or equal to $0$. Therefore $p(t) \geq 0$ for all $t \in \mathbb{R}$. Moreover, $p(0) = 0$. This shows that the descriminant of $p$ is such that:
(5)
\begin{align} \quad \left ( 2t |\langle x, y \rangle | \right )^2 - 4t^2\langle y, y \rangle \langle x, x \rangle \leq 0 \end{align}
• So for $t \neq 0$ we have that:
(6)
\begin{align} |\langle x, y \rangle| \leq \langle x, x \rangle^{1/2} \langle y, y \rangle^{1/2} \end{align}
• And the equality above holds if and only if $x + t\xi y = 0$ which shows that $x$ is a scalar multiple of $y$.


text:
# warning with hyperref package

I have met warning:"Package hyperref Warning: Composite letter \textdotbelow+u'" when i use this code to create a bookmark

\pdfbookmark{\contentsname}{Contents}

I don't know the reason for this warning, how to avoid and fix the warning.

-
What language are you using? –  egreg Dec 20 '12 at 13:52
@egreg :Sorry, i don't understand the meaning of your question. –  phuong Dec 21 '12 at 7:05
I can only conjecture that you're writing your document in Vietnamese. Please, add the first lines of your document, where you declare the language used (something like in my example code below). –  egreg Dec 21 '12 at 7:35

Pass the unicode option to hyperref:

\documentclass{article}
\usepackage[utf8]{vietnam}
\usepackage[unicode]{hyperref}
\begin{document}
\pdfbookmark{\contentsname}{Contents}
\tableofcontents

\section{a}
\end{document}

Without the option I indeed get the warning

Package hyperref Warning: Composite letter \textdotbelow+u'
(hyperref)                not defined in PD1 encoding,
(hyperref)                removing \textdotbelow' on input line 5.

The warning disappears with that option. This should be independent of the input encoding chosen; I've tried with viscii, tcvn, vps, and utf8x

-

use

\pdfbookmark{\texorpdfstring{Contents}{\contentsname}}{Contents}

For Contents In \textorpdfstring` you can use any translation without special characters which are not possible in the bookmarks of a pdf file, like your u with a underdot

-


text:
# Interesting Cherobyl – Chornobyl and Chornobyl Exclusion Zone Guide

Popular scientific book «Interesting Chernobyl. 100 Symbols» which includes stories about cities and villages of Chornobyl exclusion zone was published in 2019. Serhii Paskevych scientist of the ISP NPP is one of the authors of the book. Short description of the main Chornobyl exclusion zone sights is given on its pages. These objects are exactly those places, which tourists want to see today. It is symbolic that in the year of the book publication over 100 thousand tourists visited Chornobyl exclusion zone. The guide is oriented on English speaking auditory. Interesting Chernobyl opens new parts of miscellaneous history of Ukraine.

Remains of Soviet “cultural layer” expressed in neglected monuments, machinery, abandoned buildings create isolated conglomerates among thousands of square kilometers of territories abandoned by human. Today Prypyat is the main magnet which attracts people. It excites imagination with total absence of people in perfect, created completely by human being environment. Broad avenue, modern concrete high-rise buildings as well as thoroughly considered infrastructure of Prypyat became symbol of Soviet comfort. In one night, the city became excessively dangerous, fatal for the human. Perhaps this particular tragic metamorphosis fascinates and attracts attention of people, catches their souls with irretrievability of local collapse.

The book gives the complete idea of Chornobyl exclusion zone and acquaints not only with remains of the past but also with unique object of wildlife, occurrence of which relates to radiation catastrophe – “Red forest”.

Also book tells about unique military facility, metal towers of which over 50 years obstinately rise over Polissya forests. Radar created by Soviet engineers became a culmination in strategic confrontation between empires.

The book contains information on cultural heritage, which is extant to us in the form of churches, neglected ancient cemeteries and mounds. The book saturated with colorful pictures, conveys color of ancient artefacts many of which have become symbols of lost culture.

Цей запис також доступний: Ukrainian, Russian

## Related posts

Insert math as
Formula color
Type math using LaTeX
Preview
$${}$$
Nothing to preview
Insert


text:
# N-Body Gravitational Simulation of Point-Masses in Python

I made an n-body gravitational simulation in python. The algorithm does produce an approximate solution, which is shown at the bottom of the post. Additional methods to produce animations (among other things) can be found here. I would like to see if efficiency, readability, and/or accuracy can be improved.

The main idea of the algorithm is this: given two bodies of masses m_i and m_j separated by a distance r_ij apart (for i ≠ j), one can calculate the acceleration due to gravity of m_i. This is repeated for all bodies at each iteration of time to get the net acceleration a_i of m_i. The velocity is obtained by integrating the acceleration (since dv = a dt); similarly, displacement is given by integrating velocity. The process repeats for each iteration of time.

For convenience, the class Body contains array attributes such as position, velocity, and acceleration, which are updated at each iteration of time.

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

class Body():

"""
This class contains adjustable parameters as attributes. These
parameters include current and previous positions, velocities, and
accelerations.
"""

def __init__(self, identifier, facecolor, position, mass=1, velocity=None, acceleration=None, notes=None):
"""
identifier:
type <str>

facecolor:
type <str>

position:
type <tuple / list / array>

mass:
type <int / float>

velocity:
type <tuple / list / array> or None

acceleration:
type <tuple / list / array> or None

notes:
type <str> or None
"""
self.identifier = identifier
self.facecolor = facecolor
self.position = np.array(position, dtype=float)
self.mass = mass
self.velocity = self.autocorrect_parameter(velocity)
self.acceleration = self.autocorrect_parameter(acceleration)
self._vector_position = [self.position]
self._vector_velocity = [self.velocity]
self._vector_acceleration = [self.acceleration]
self.notes = notes

def __str__(self):
res = ''
for key in ('identifier', 'vector_position'):
value = getattr(self, key)
text = '\n .. {}:\n\t{}\n'.format(key, value)
res += '{}'.format(text)
return res

def autocorrect_parameter(self, args):
"""
args:
type <tuple / list / array> or None
"""
if args is None:
return np.zeros(self.position.shape, dtype=float)
else:
return np.array(args, dtype=float)

@property
def vector_position(self):
return np.array(self._vector_position)

@property
def vector_velocity(self):
return np.array(self._vector_velocity)

@property
def vector_acceleration(self):
return np.array(self._vector_acceleration)

@property
def scalar_position(self):
return np.sqrt(np.sum(np.square(self.vector_position), axis=1))

@property
def scalar_velocity(self):
return np.sqrt(np.sum(np.square(self.vector_velocity), axis=1))

@property
def scalar_acceleration(self):
return np.sqrt(np.sum(np.square(self.vector_acceleration), axis=1))

def get_vector(self, parameter):
"""
parameter:
type <str>
"""
attribute = 'vector_{}'.format(parameter)
return getattr(self, attribute)

def get_scalar(self, parameter):
"""
parameter:
type <str>
"""
attribute = 'scalar_{}'.format(parameter)
return getattr(self, attribute)

Before creating instances of the Body class, it's important for units to be scaled properly. The class UnitConversions contains convenience methods for this purpose.

class UnitConversions():

"""
This class contains methods to convert measurements from one unit to
another. Measurable quantities include distance, time, velocity, mass,
and acceleration. All values are scaled to their corresponding units
such that each base quantity measured in SI units has a value of 1.
"""

def __init__(self):
self.distance_units = ('meter', 'kilometer', 'mile', 'Astronomical Unit', 'Light Year', 'parsec')
self.distance_values = (1, 1000, 1609, 1.496e11, 9.461e15, 3.086e16)
self.time_units = ('second', 'hour', 'day', 'year')
self.time_values = (1, 3600, 3600*24, 3600*24*365)
self.mass_units = ('gram', 'kilogram', 'lunar mass', 'earth mass', 'solar mass')
self.mass_values = (1/1000, 1, 7.3459e22, 5.9722e24, 1.988e30)
self.distance_conversion_factors = self.get_conversion_factors(self.distance_units, self.distance_values, base_unit='meter')
self.time_conversion_factors = self.get_conversion_factors(self.time_units, self.time_values, base_unit='second')
self.mass_conversion_factors = self.get_conversion_factors(self.mass_units, self.mass_values, base_unit='kilogram')

@staticmethod
def get_conversion_factors(units, values, base_unit):
"""
units:
type <tuple / list / array>

values:
type <tuple / list / array>

base_unit:
type <str>
"""
res = {}
for outer_key, outer_value in zip(units, values):
if outer_key == base_unit:
res[outer_key] = dict(zip(units, values))
else:
res[outer_key] = {}
for inner_key, inner_value in zip(units, values):
res[outer_key][inner_key] = inner_value / outer_value
return res

def convert_distance(self, distance, original_unit, prime_unit='meter'):
"""
distance:
type <int / float / array>

original_unit:
type <str>

prime_unit:
type <str>
"""
conversion_factor = self.distance_conversion_factors[prime_unit][original_unit]
return distance * conversion_factor

def convert_time(self, time, original_unit, prime_unit='second'):
"""
time:
type <int / float / array>

original_unit:
type <str>

prime_unit:
type <str>
"""
conversion_factor = self.time_conversion_factors[prime_unit][original_unit]
return time * conversion_factor

def convert_mass(self, mass, original_unit, prime_unit='kilogram'):
"""
mass:
type <int / float / array>

original_unit:
type <str>

prime_unit:
type <str>
"""
conversion_factor = self.mass_conversion_factors[prime_unit][original_unit]
return mass * conversion_factor

def convert_velocity(self, distance, time, original_distance_unit, original_time_unit, prime_distance_unit='meter', prime_time_unit='second'):
"""
velocity:
type <int / float / array>

original_distance_unit:
type <str>

original_time_unit:
type <str>

prime_distance_unit:
type <str>

prime_time_unit:
type <str>
"""
return self.convert_distance(distance, original_distance_unit, prime_distance_unit) / self.convert_time(time, original_time_unit, prime_time_unit)

def convert_acceleration(self, distance, time, original_distance_unit, original_time_unit, prime_distance_unit='meter', prime_time_unit='second'):
"""
velocity:
type <int / float / array>

original_distance_unit:
type <str>

original_time_unit:
type <str>

prime_distance_unit:
type <str>

prime_time_unit:
type <str>
"""
return self.convert_distance(distance, original_distance_unit, prime_distance_unit) / self.convert_time(time, original_time_unit, prime_time_unit)**2

The class GravitationalDynamics is used to store and update bodies and their associated parameters.

class GravitationalDynamics():

"""
This class contains methods to run a simulation of N bodies that interact
gravitationally over some time. Each body in the simulation keeps a record
of parameters (position, velocity, and acceleration) as time progresses.
"""

def __init__(self, bodies, t=0, gravitational_constant=6.67e-11):
"""
bodies:
type <tuple / list / array>

t:
type <int / float>

gravitational_constant:
type <float>
"""
self._bodies = bodies
self.nbodies = len(bodies)
self.ndim = len(bodies[0].position)
self.t = t
self._moments = [t]
self.gravitational_constant = gravitational_constant
# self._collision_times = []

@property
def bodies(self):
return self._bodies

@property
def moments(self):
return np.array(self._moments)

def get_acceleration(self, ibody, jbody):
"""
ibody:
type <custom class: Body>

jbody:
type <custom class: Body>
"""
dpos = ibody.position - jbody.position
r = np.sum(dpos**2)
acc = -1 * self.gravitational_constant * jbody.mass * dpos / np.sqrt(r**3)
return acc

def update_accelerations(self):
for ith_body, ibody in enumerate(self.bodies):
ibody.acceleration *= 0
for jth_body, jbody in enumerate(self.bodies):
if ith_body != jth_body:
acc = self.get_acceleration(ibody, jbody)
ibody.acceleration += acc
ibody._vector_acceleration.append(np.copy(ibody.acceleration))

def update_velocities_and_positions(self, dt):
"""
dt:
type <int / float>
"""
for ith_body, ibody in enumerate(self.bodies):
ibody.velocity += ibody.acceleration * dt
ibody.position += ibody.velocity * dt
ibody._vector_velocity.append(np.copy(ibody.velocity))
ibody._vector_position.append(np.copy(ibody.position))

def simulate(self, dt, duration):
"""
dt:
type <int / float>

duration:
type <int / float>
"""
nsteps = int(duration / dt)
for ith_step in range(nsteps):
self.update_accelerations()
self.update_velocities_and_positions(dt)
self.t += dt
self._moments.append(self.t)
## check collisions

One can use the algorithm above using the commands below. The parameter values of each planet are taken from wolfram alpha.

UC = UnitConversions()

m_sun = UC.convert_mass(1, original_unit='solar mass', prime_unit='kilogram')
Sun = Body(identifier='Sun', facecolor='yellow', mass=m_sun, position=[0, 0, 0])

m_mercury = UC.convert_mass(0.05227, original_unit='earth mass', prime_unit='kilogram')
d_mercury = UC.convert_distance(0.4392, original_unit='Astronomical Unit', prime_unit='meter')
v_mercury = UC.convert_distance(106000, original_unit='mile', prime_unit='meter') / UC.convert_time(1, original_unit='hour', prime_unit='second')
Mercury = Body(identifier='Mercury', facecolor='gray', mass=m_mercury, position=[d_mercury, 0, 0], velocity=[0, v_mercury, 0])

m_earth = UC.convert_mass(1, original_unit='earth mass', prime_unit='kilogram')
d_earth = UC.convert_distance(1, original_unit='Astronomical Unit', prime_unit='meter')
v_earth = UC.convert_distance(66600, original_unit='mile', prime_unit='meter') / UC.convert_time(1, original_unit='hour', prime_unit='second')
Earth = Body(identifier='Earth', facecolor='blue', mass=m_earth, position=[d_earth, 0, 0], velocity=[0, v_earth, 0])

m_mars = UC.convert_mass(0.1704, original_unit='earth mass', prime_unit='kilogram')
d_mars = UC.convert_distance(1.653, original_unit='Astronomical Unit', prime_unit='meter')
v_mars = UC.convert_distance(53900, original_unit='mile', prime_unit='meter') / UC.convert_time(1, original_unit='hour', prime_unit='second')
Mars = Body(identifier='Mars', facecolor='darkred', mass=m_mars, position=[0, d_mars, 0], velocity=[v_mars, 0, 0])

bodies = [Sun, Mercury, Earth, Mars]
dt = UC.convert_time(2, original_unit='day', prime_unit='second')
duration = UC.convert_time(10, original_unit='year', prime_unit='second')

GD = GravitationalDynamics(bodies)
GD.simulate(dt, duration)

To check that the simulation ran, one can check various parameters of each body in GD.bodies. Alternatively, we can visualize an image using the commands below (animation is provided in github link above). The image on the left shows a sequence of scattered points (one (x, y, z) point with scaling in AU for each time t), and the image on the right shows that the orbits are elliptical (since the closest and farthest points appear periodic over time (AU against years).

fig = plt.figure(figsize=(11, 7))
ax_left = fig.add_subplot(1, 2, 1, projection='3d')
ax_left.set_title('3-D Position')
ax_right.set_title('Displacement vs Time')
ts = UC.convert_time(GD.moments, original_unit='second', prime_unit='year')
xticks = np.arange(max(ts)+1).astype(int)

for body in GD.bodies:
vector = body.get_vector('position')
vector_coordinates = UC.convert_distance(vector, original_unit='meter', prime_unit='Astronomical Unit')
scalar = body.get_scalar('position')
scalar_coordinates = UC.convert_distance(scalar, original_unit='meter', prime_unit='Astronomical Unit')
ax_left.scatter(*vector_coordinates.T, marker='.', c=body.facecolor, label=body.identifier)
ax_right.scatter(ts, scalar_coordinates, marker='.', c=body.facecolor, label=body.identifier)
ax_right.set_xticks(xticks)
ax_right.grid(color='k', linestyle=':', alpha=0.3)
fig.legend(loc='lower center', mode='expand', ncol=len(GD.bodies))
plt.show()
plt.close(fig)

I should note that the simulation is only an approximation. Using both autocorrelation and power spectral density in a simulation containing all 8 planets of our solar system, some of the orbital periods appear exact (such Earth using velocity or acceleration), while others are off by some non-negligible amount (such as Mercury). I don't know whether or not to attribute this to float precision, the method of integration, the use of a discrete time-step to describe continuous motion, or the lack of relativity. That said, the method works for the lower-order case; the figure above shows that Earth's orbital period is one year, with fluctuations about 1 AU.

How can this algorithm be improved? Is anything implemented above something to be frowned upon? Trying to "self-learn" as much as possible, so (please) don't be nice.

Below is a list of my suggestions. You can find my changes to your code here: https://gist.github.com/bjourne/6270cff58c0238bb863e189ea63d6254

There's a saying in movie production that one must kill one's darlings. It means that if something is not serving it's purpose it must be deleted even if the author is fond of it or has worked very hard with it. I can tell that you have worked hard with the UnitConversions class, but it is an example of such a darling. You can replace it with constants:

# Masses
SOLAR_MASS = 1.988e30
EARTH_MASS = 5.9722e24

# Distances
ASTRO_UNIT = 1.496e11
MILE = 1609

# Durations
HOUR = 3600
DAY = 24 * HOUR
YEAR = 365 * DAY

m_earth = 1 * EARTH_MASS
d_earth = 1 * ASTRO_UNIT
v_earth = (66_600 * MILE) / (1 * HOUR)

## Put code in functions or classes

It looks like your main code is running at the module level. That can cause weird problems with shadowed variables. I suggest always using the following structure:

def main():
... main code here...
if __name__ == '__main__':
main()

You are violating some of the style guidelines in PEP 8. For example, you use initial uppercase letters in some variable names and many lines are longer than 79 characters.

## Delete stuff you don't use

I found lots of ununsed variables and methods in the Body class; notes, __str__(), scalar_velocity(), scalar_acceleration(), vector_acceleration(), and vector_velocity().

## Don't put type declarations in comments

Personally, I'm not a fan of Python's optional type declarations. But if you want to use them, you should put them in the parameter lists like this

def get_vector(self, parameter: str):
attribute = 'vector_{}'.format(parameter)
return getattr(self, attribute)

## Prefer positional arguments over keyword arguments

What I mean is that instead of

Sun = Body(identifier='Sun', facecolor='yellow',
mass=m_sun, position=[0, 0, 0])

you can just write

Sun = Body('Sun', 'yellow', [0, 0, 0], m_sun)

which makes the code less verbose. Keyword arguments are sometimes useful but I don't think they are useful in your code.

## Avoid "magic"

Using features that depend on introspection makes code harder to understand. So instead of

def get_scalar(self, parameter):
attribute = 'scalar_{}'.format(parameter)
return getattr(self, attribute)
...
scalar = body.get_scalar('position')

simply write

scalar = body.scalar_position

## Avoid @property

Methods declared as properties can be misleading to readers because the method call is "hidden." I would suggest avoiding them unless you have compelling reasons to use them (that they look nice is not a good reason :)).

## Don't hide privates

Java recommends you to hide implementation details. But that is not the case in Python and it is ok for users of objects to access member attributes directly.

## Consider using abbreviations

Shorter variable names are preferable because they are easier to read. On the other hand, short names doesn't carry as much information as long ones so one has to try and find a happy middle ground. In your code, I suggest that you use pos, vel and acc as abbreviations for position, velocity and acceleration respectively. For someone interested in N-body simulations, these abbreviations should be self-explanatory.

• Thank you for the feedback. The only thing I disagree about is the part about "killing the darlings". That code block is not necessary for the code snippet shown, but is useful in the full code on github. I did not put the full code because the snippet above is already kind of long and not needed to create a functional example, plus I was hoping to improve the code in terms of efficiency / accuracy. That said, I agree with all of your other corrections and criticisms. – user182606 Dec 25 '19 at 11:21


text:
# Find the perimeter of a regular hexagon with each side measuring $8 \mathrm{~m}$.

#### Complete Python Prime Pack

9 Courses     2 eBooks

#### Artificial Intelligence & Machine Learning Prime Pack

6 Courses     1 eBooks

#### Java Prime Pack

9 Courses     2 eBooks

Given:

Each side of the given regular hexagon measures $8\ m$.

To do:

We have to find the perimeter of the regular hexagon.

Solution:

We know that,

The perimeter of a regular hexagon with each side measuring $a$ is $6a$.

Therefore,

The perimeter of the regular hexagon with each side measuring $8\ m = 6\times8\ m$

$=48\ m$

The perimeter of the regular hexagon with each side measuring $8\ m$ is $48\ m$.

Updated on 10-Oct-2022 13:36:27


text:
complexity theory

# Mathematician’s New Algorithm Represents Significant Advance in Complexity Theory

Mathematician and computer scientist László Babai seems to have successfully simplified the graph isomorphism problem.