# Hablu

Standard

My first experience of problem setting. It feels good when you see people think about your problem and come up with better solutions than yours đ

# UVa Easy Problem List

Standard

UVa(University of Valladolid) has one of the best online judges to start online problem solving. Here is a list of some easy problems from UVa for newbies.

100, 119, 133, 136, 146, 272, 401, 409, 412, 440, 444, 446, 458, 468, 476, 488, 489, 490, 492, 494, 498, 499, 541, 575, 579, 583, 729, 900, 913, 10035, 10038, 10055, 10071, 10082, 10110, 10222, 10235, 10327, 10346, 10370, 10424, 10469, 10591, 10696, 10699, 10789, 10812, 10922, 10924, 10929, 10931, 10970, 11152, 11172, 11185, 11192, 11219, 11233, 11462, 11530, 11727, 11764, 11799, 11804, 11805, 11827, 11854, 11875, 11900, 11917, 11934, 11936, 11942, 11984, 11988, 11991, 11995, 12015, 12149, 12149, 12149, 12149, 12149, 12149, 12372, 12372, 12372, 12372, 12372

# Kruskal’s Minimum Spanning Tree Algorithm

Standard

Kruskal’s algorithm is the best and probably fastest option if you’re urging to form a subgraph of a graph connecting all nodes. Some implementations are shown.

Minimum Spanning Tree
To form an MST(Minimum Spanning Tree) follow this procedure,

1. Begin with a connected graph G.
2. E is the set of all edges of different weights, from G.
3. Sort edges of E in the ascending order of their weights.
4. Go through each member(edge) of E and see if the nodes of that edge is already connected or not.
5. If they aren’t connected, connect them and include that member of E(edge) int MST.
6. Continue this process untill you’ve got n-1 edges(in case of n nodes).

An implementation in C++ using Disjoint Set data structure, is shown

```#include <cstdio>
#include <algorithm>
#define MAX_node 100000
using namespace std;

struct edg{
int a,b,w;
bool operator < (const edg &b) const{
return w<b.w;
}
}E[MAX_node+1];

int Prev[MAX_node+1];
int parent(int a){
if(a==Prev[a]) return a;
return Prev[a]=parent(Prev[a]);
}

int main(){
int node,edge;
while(scanf("%d%d",&node,&edge)){

int TOTAL=0;

for(int i=1;i<=node;i++) Prev[i]=i;//*
for(int i=0;i<edge;i++) scanf("%d%d%d",&E[i].a,&E[i].b,&E[i].w);//**

sort(E,E+edge);//***

for(int i=0; i<edge; i++ ){
int u=parent(E[i].a);//****
int v=parent(E[i].b);

if(u!=v){
TOTAL+=E[i].w;
Prev[u]=v;//*****
}
}

printf("Total Cost of MST %d\n",TOTAL);
}
return 0;
}

/*
* Making each node it's own parent
** Input edges in the format "node1 node2 weight"
*** Sorting them in the ascending order of weight
**** Find the current parent of a and b
***** If the nodes of that edge is not connected yet, Connect them.
*/

```

if you don’t know Maximum possible number of nodes, then just use a vector(which is a bit slower) of type ‘edg’.

Maximum Spanning Tree
To get a maximum spanning tree, the procedure is almost same. The only difference is that, you got to sort members of E in the descending order of their weights.

Related Problems
Heavy Cargo(UVa)

Second Best Minimum Spanning Tree
There may be some other better procedure to find the second best MST, but this is the one I’ve used.
1. First form an MST of graph G, and mark the edges which formes the MST.
2. Then for each member edge of the MST, Form another MST without using that particular member.
3. Thus, u need to form n-1 (in case of n nodes) ‘another’ MSTs and consider the minimun among them.

Related Problems
Is There A Second Way Left ?(UVa)
ACM contest and Blackout(UVa)

# Installing Elements for Compiz Fusion

Standard

Elements is a plugin for Compiz Fusion 0.7.4 which integrates all the features of the popular Snow, Autumn, Fireflies, and Stars plugins, plus an all new feature, Bubbles. Written from the ground-up with only open source software, Elements is designed to be free, fast, and fun. Itâs also fully customizable. You want flower petals falling in spring? Draw the petals and use them with the Autumn feature. Want to have toasters flying towards you at warp speed? Take a picture of your toaster and use it with the Stars feature. Feel really adventuresome? Take a look at the code and make it your own. Elements is completely free and released under the GNU General Public Licence (GPL).

Once you downloaded you need to install this using the following command

```bash ./elementsinstall.sh
```

This will complete the installation

Uninstall Elements Plugin

If you want to uninstall elements plugin follow this procedure

```cd ~/.elements
sudo make uninstall
make clean
compiz --replace &amp
```

# āĻāĻāĻāĻŋāĻāĻŦ āĻāĻĨāĻ¨

Standard

āĻāĻŋāĻāĻŦ āĻ¸āĻžāĻāĻāĻā§āĻ˛ā§āĻ° āĻŽāĻ§ā§āĻ¯ā§ āĻāĻāĻāĻŋāĻāĻŦ āĻ¸āĻŦāĻ¸āĻŽā§āĻ āĻļā§āĻ°ā§āĻˇā§ āĻāĻŋāĻ˛āĨ¤ āĻ­āĻŋāĻĄāĻŋāĻ āĻ¸ā§āĻā§āĻ°āĻŋāĻŽāĻŋāĻā§ā§āĻ° āĻāĻ āĻāĻ¸āĻžāĻ§āĻžāĻ°āĻ¨ āĻ¸āĻžāĻāĻāĻāĻŋ āĻŦā§āĻ˛āĻāĻžāĻ°āĻĻā§āĻ° āĻāĻ¨ā§āĻ¯āĻ āĻāĻ¨ā§āĻ āĻā§āĻ°ā§āĻ¤ā§āĻŦ āĻŦāĻšāĻ¨ āĻāĻ°ā§āĨ¤ āĻāĻ āĻĒā§āĻ¸ā§āĻā§ āĻāĻāĻāĻŋāĻāĻŦ āĻŦā§āĻ¯āĻžāĻŦāĻšāĻžāĻ°ā§āĻ° āĻāĻŋāĻā§ “āĻāĻŋāĻĒāĻ¸ āĻā§āĻ¯āĻžāĻ¨ā§āĻĄ āĻā§āĻ°āĻŋāĻāĻ¸” āĻĻā§ā§āĻž āĻšāĻ˛āĨ¤

āĻ­āĻŋāĻĄāĻŋāĻ āĻĄāĻžāĻāĻ¨āĻ˛ā§āĻĄ

āĻāĻāĻāĻŋāĻāĻŦ āĻĨā§āĻā§ āĻ­āĻŋāĻĄāĻŋāĻ āĻĄāĻžāĻāĻ¨āĻ˛ā§āĻĄā§āĻ° āĻāĻŽ āĻāĻ°ā§ āĻšāĻ˛ā§āĻ āĻšāĻžāĻāĻžāĻ°āĻāĻžāĻ¨ā§āĻ āĻ¨āĻŋā§āĻŽ āĻāĻā§āĨ¤ āĻ¸āĻŦāĻā§ā§ā§ āĻāĻ¨āĻĒā§āĻ°āĻŋā§ āĻšāĻā§āĻā§ OK āĻĒāĻĻā§āĻ§āĻ¤āĻŋāĨ¤

āĻ§āĻ°ā§āĻ¨ āĻāĻĒāĻ¨āĻŋ http://www.youtube.com/watch?v=5baDknt6Z7w āĻāĻ āĻ­āĻŋāĻĄāĻŋāĻāĻāĻŋ āĻ¯āĻĻāĻŋ āĻĄāĻžāĻāĻ¨āĻ˛ā§āĻĄ āĻāĻ°āĻ¤ā§ āĻāĻžāĻ¨ āĻ¤āĻžāĻšāĻ˛ā§ āĻāĻĄā§āĻ°ā§āĻ¸āĻŦāĻžāĻ°ā§ youtube āĻāĻĨāĻžāĻāĻŋāĻ° āĻāĻā§ OK āĻ˛āĻŋāĻā§ Enter āĻāĻžāĻĒāĻ˛ā§āĻ āĻšāĻŦā§āĨ¤ āĻāĻ°ā§āĻĨāĻžā§ http://www.OKyoutube.com/watch?v=5baDknt6Z7w āĻ˛āĻŋāĻā§ Enter āĻāĻžāĻĒāĻ˛ā§āĻ āĻĻā§āĻāĻŦā§āĻ¨ āĻ­āĻŋāĻĄāĻŋāĻāĻāĻŋ āĻĄāĻžāĻāĻ¨āĻ˛ā§āĻĄ āĻšāĻā§āĻā§āĨ¤

āĻāĻ°āĻāĻŽ āĻāĻ°āĻ āĻ¨āĻŋā§āĻŽā§āĻ° āĻŽāĻžāĻā§ āĻāĻāĻāĻŋ āĻšāĻā§āĻā§ OK āĻāĻ° āĻāĻžāĻ¯āĻŧāĻāĻžāĻ¯āĻŧ kiss āĻ˛āĻŋāĻāĻžāĨ¤ āĻāĻ°ā§āĻĨāĻžā§ āĻ¯āĻĻāĻŋ http://www.youtube.com/watch?v=5baDknt6Z7w āĻ­āĻŋāĻĄāĻŋāĻāĻāĻž āĻĄāĻžāĻāĻ¨āĻ˛ā§āĻĄ āĻāĻ°āĻ¤ā§ āĻšāĻ¯āĻŧ āĻ¤āĻŦā§ āĻāĻĄā§āĻ°ā§āĻ¸āĻŦāĻžāĻ°ā§ http://www.youtube.com/watch?v=5baDknt6Z7w āĻ˛āĻŋāĻāĻ˛ā§āĻ āĻāĻ˛āĻŦā§!

āĻāĻĒāĻ¨āĻŋ āĻ¯āĻĻāĻŋ āĻā§āĻ¨ āĻ¨āĻŋāĻ°ā§āĻĻāĻŋāĻˇā§āĻ āĻĢāĻ°āĻŽā§āĻ¯āĻžāĻā§āĻ° āĻ­āĻŋāĻĄāĻŋāĻ āĻĄāĻžāĻāĻ¨āĻ˛ā§āĻĄ āĻāĻ°āĻ¤ā§ āĻāĻžāĻ¨, āĻ¤āĻžāĻšāĻ˛ā§ youtube000 āĻĒāĻĻā§āĻ§āĻ¤āĻŋāĻāĻŋ āĻāĻĒāĻ¨āĻžāĻ° āĻāĻĒāĻ¯ā§āĻāĻŋāĨ¤ āĻāĻāĻžāĻ¨ā§, āĻ¯āĻĻāĻŋ āĻ˛āĻŋāĻā§āĻ āĻšāĻ¯āĻŧ http://www.youtube.com/watch?v=5baDknt6Z7w āĻ¤āĻžāĻšāĻ˛ā§ āĻĄāĻžāĻāĻ¨āĻ˛ā§āĻĄā§āĻ° āĻ˛āĻŋāĻā§āĻ āĻšāĻŦā§ http://www.youtube.com000/watch?v=5baDknt6Z7w āĨ¤ āĻāĻāĻžāĻ¨ā§ flv, mp4 , 3gp āĻ¤āĻŋāĻ¨āĻāĻž āĻĢāĻ°āĻŽā§āĻ¯āĻžāĻ āĻĨā§āĻā§ āĻāĻĒāĻ¨āĻžāĻā§ āĻŦā§āĻā§ āĻ¨āĻŋāĻ¤ā§ āĻšāĻŦā§ āĨ¤

āĻāĻ° āĻāĻĒāĻ¨āĻžāĻ° āĻ¯āĻĻāĻŋ āĻšāĻžāĻāĻā§ā§āĻžāĻ˛āĻŋāĻāĻŋ āĻ­āĻŋāĻĄāĻŋāĻ(HQ/HD) āĻĒā§āĻ°ā§ā§āĻāĻ¨ āĻšā§, āĻ¤āĻžāĻšāĻ˛ā§ youtube āĻāĻ° āĻāĻžāĻ¯āĻŧāĻāĻžāĻ¯āĻŧ keephd āĻ˛āĻŋāĻāĻ˛ā§ āĻāĻ°ā§āĻĨāĻžā§ http://www.youtube.com/watch?v=5baDknt6Z7w āĻāĻāĻž āĻĄāĻžāĻāĻ¨āĻ˛ā§āĻĄ āĻāĻ°āĻ¤ā§ http://www.keepHD.com/watch?v=5baDknt6Z7w āĻ˛āĻŋāĻāĻ˛ā§ āĻāĻĒāĻ¨āĻŋ Flash, For mobile, Mp4, HQ MP4(720p), HQ MP4(1080p) āĻĢāĻ°āĻŽāĻžāĻā§āĻ° āĻĄāĻžāĻāĻ¨āĻ˛ā§āĻĄ āĻ˛āĻŋāĻā§āĻ āĻĒā§ā§ā§ āĻ¯āĻžāĻŦā§āĻ¨āĨ¤

āĻāĻ āĻ¸ā§āĻŦāĻŋāĻ§āĻžāĻā§āĻ˛ā§ āĻĒā§āĻ¤ā§ āĻšāĻ˛ā§ āĻāĻŦāĻļā§āĻ¯āĻ āĻāĻĒāĻ¨āĻžāĻ° āĻāĻŽā§āĻĒāĻŋāĻāĻāĻžāĻ°ā§ āĻāĻžāĻ­āĻž āĻĨāĻžāĻāĻ¤ā§ āĻšāĻŦā§āĨ¤ āĻ¨āĻž āĻĨāĻžāĻāĻ˛ā§, āĻ¸ā§āĻāĻŋ āĻĒāĻžāĻŦā§āĻ¨ āĻāĻāĻžāĻ¨ā§āĨ¤

āĻšāĻžāĻ āĻā§āĻ¯āĻŧāĻžāĻ˛āĻŋāĻāĻŋ āĻ­āĻŋāĻĄāĻŋāĻ āĻĻā§āĻāĻž

āĻāĻāĻāĻŋāĻāĻŦā§āĻ° āĻ¸āĻŦ āĻ­āĻŋāĻĄāĻŋāĻ āĻšāĻžāĻ āĻā§āĻ¯āĻŧāĻžāĻ˛āĻŋāĻāĻŋāĻ¤ā§ āĻĨāĻžāĻā§ āĻ¨āĻžāĨ¤ āĻāĻŋāĻ¨ā§āĻ¤ā§ āĻāĻĒāĻ¨āĻŋ āĻāĻā§āĻāĻž āĻāĻ°āĻ˛ā§ āĻ¤āĻž āĻšāĻžāĻ āĻā§āĻ¯āĻŧāĻžāĻ˛āĻŋāĻāĻŋāĻ¤ā§ āĻĻā§āĻāĻ¤ā§ āĻĒāĻžāĻ°ā§āĻ¨āĨ¤ āĻāĻ° āĻāĻ¨ā§āĻ¯ āĻāĻĒāĻ¨āĻžāĻā§ āĻ¯āĻž āĻāĻ°āĻ¤ā§ āĻšāĻŦā§ āĻ¤āĻž āĻšāĻā§āĻā§,
url āĻāĻ° āĻļā§āĻˇā§ â&fmt=18â˛ āĻāĻĨāĻŦāĻž â&fmt=22â˛ āĻ¯ā§āĻ āĻāĻ°āĻ¤ā§ āĻšāĻŦā§āĨ¤

āĻāĻĻāĻžāĻšāĻ°āĻ¨āĻ http://www.youtube.com/watch?v=Lm3mS6rvsv āĻ¤ā§ āĻ­āĻŋāĻĄāĻŋāĻ āĻāĻŋ āĻ¸āĻžāĻ§āĻžāĻ°āĻŖ āĻā§āĻ¯āĻŧāĻžāĻ˛āĻŋāĻāĻŋāĻ¤ā§ āĻāĻā§ āĻāĻā§āĻˇā§āĻ¤ā§āĻ°ā§ āĻāĻĒāĻ¨āĻŋ http://www.youtube.com/watch?v=Lm3mS6rvsv&fmt=18 āĻāĻĨāĻŦāĻž http://www.youtube.com/watch?v=VT4E_BkEx5k&fmt=22 āĻ¤ā§ āĻšāĻžāĻ āĻā§āĻ¯āĻŧāĻžāĻ˛āĻŋāĻāĻŋ āĻ­āĻŋāĻĄāĻŋāĻ āĻĒāĻžāĻŦā§āĻ¨āĨ¤

āĻšāĻžāĻ-āĻā§āĻ¯āĻŧāĻžāĻ˛āĻŋāĻāĻŋ āĻ­āĻŋāĻĄāĻŋāĻ āĻāĻŽāĻŦā§āĻĄ āĻāĻ°āĻž

āĻāĻ° āĻāĻ¨ā§āĻ¯ āĻļā§āĻˇā§ â&ap=%26fmt=18âŗ āĻāĻĨāĻŦāĻž â&ap=%26fmt=22âŗ āĻ¯ā§āĻ āĻāĻ°āĻ¤ā§ āĻšāĻŦā§āĨ¤

āĻ­āĻŋāĻĄāĻŋāĻāĻ° āĻ¨āĻŋāĻ°ā§āĻĻāĻŋāĻˇā§āĻ āĻāĻāĻļ āĻĻā§āĻāĻž

āĻ§āĻ°ā§āĻ¨, āĻāĻĒāĻ¨āĻžāĻ° āĻĒā§āĻ°ā§ āĻ­āĻŋāĻĄāĻŋāĻāĻāĻŋ āĻĻā§āĻāĻžāĻ° āĻĻāĻ°āĻāĻžāĻ° āĻ¨ā§āĻāĨ¤ ā§§ āĻŽāĻŋāĻ¨āĻŋāĻ ā§¨ā§¨ āĻ¸ā§āĻā§āĻ¨ā§āĻĄ āĻĒāĻ° āĻĨā§āĻā§ āĻĻā§āĻāĻ¤ā§ āĻāĻžāĻ¨āĨ¤ āĻ¸ā§āĻā§āĻˇā§āĻ¤ā§āĻ°ā§ url āĻāĻ° āĻļā§āĻˇā§ #t=01m22s (#t=XXmYYs for XX mins and YY seconds) āĻ¯ā§āĻ āĻāĻ°ā§āĻ¨āĨ¤

āĻ­āĻŋāĻĄāĻŋāĻāĻ° āĻ¨āĻŋāĻ°ā§āĻĻāĻŋāĻˇā§āĻ āĻāĻāĻļ āĻāĻŽāĻŦā§āĻĄ āĻāĻ°āĻž

āĻāĻāĻŋ āĻŦā§āĻ˛āĻāĻžāĻ°āĻĻā§āĻ° āĻāĻ¨ā§āĻ¯ āĻā§āĻŦāĻ āĻā§āĻ°ā§āĻ¤ā§āĻŦāĻĒā§āĻ°ā§āĻ¨āĨ¤ āĻ§āĻ°ā§āĻ¨ āĻāĻĒāĻ¨āĻŋ āĻāĻāĻāĻŋ ā§Šā§Ļ āĻŽāĻŋāĻ¨āĻŋāĻā§āĻ° āĻ­āĻŋāĻĄāĻŋāĻ āĻāĻŽāĻŦā§āĻĄ āĻāĻ°ā§āĻā§āĻ¨, āĻāĻŋāĻ¨ā§āĻ¤ā§ āĻ¸ā§āĻāĻŋāĻ° āĻļā§āĻˇ ā§Ģ āĻŽāĻŋāĻ¨āĻŋāĻ āĻāĻĒāĻ¨āĻžāĻ° āĻĒā§āĻ¸ā§āĻā§āĻ° āĻĒā§āĻ°ā§ā§āĻāĻ¨āĨ¤ āĻāĻāĻŋāĻā§ āĻā§āĻā§ āĻŦā§āĻ° āĻāĻ°āĻ¤ā§ āĻĒāĻžāĻ āĻāĻĻā§āĻ° ( āĻāĻŽāĻ¨āĻāĻŋ āĻāĻĒāĻ¨āĻžāĻā§āĻ ) āĻāĻžāĻŽā§āĻ˛āĻž āĻĒā§āĻšāĻžāĻ¤ā§ āĻšā§āĨ¤ āĻāĻ° āĻā§ā§ā§ āĻĸā§āĻ° āĻ­āĻžāĻ˛ā§ āĻ­āĻŋāĻĄāĻŋāĻāĻāĻŋāĻ° ā§¨ā§Ģ āĻŽāĻŋāĻ¨āĻŋāĻ ( ā§¨ā§Ģ*ā§Ŧā§Ļ=ā§§ā§Ģā§Ļā§Ļ āĻ¸ā§āĻā§āĻ¨ā§āĻĄ ) āĻĒāĻ° āĻĨā§āĻā§ āĻāĻŽāĻŦā§āĻĄ āĻāĻ°ā§āĻ¨āĨ¤ āĻ¸ā§āĻāĻ¨ā§āĻ¯ āĻāĻĒāĻ¨āĻžāĻ° url āĻāĻ° āĻļā§āĻˇā§ â&start=1500â˛ āĻ¯ā§āĻ āĻāĻ°āĻ˛ā§āĻ āĻāĻ˛āĻŦā§āĨ¤

āĻāĻŽāĻŦā§āĻĄā§āĻĄ āĻ­āĻŋāĻĄāĻŋāĻ āĻāĻā§āĻĒā§āĻ˛ā§ āĻāĻ°āĻž

āĻā§āĻ¨ āĻ¸āĻžāĻāĻā§ āĻā§āĻ¨ āĻ­āĻŋāĻĄāĻŋāĻ āĻāĻŽāĻŦā§āĻĄ āĻāĻ°āĻžāĻ° āĻĒāĻ°, āĻ¸āĻžāĻ§āĻžāĻ°āĻŖāĻ¤ āĻ­āĻŋāĻĄāĻŋāĻāĻ° āĻāĻĒāĻ° āĻā§āĻ˛āĻŋāĻ āĻ¨āĻž āĻāĻ°āĻž āĻĒāĻ°ā§āĻ¯āĻ¨ā§āĻ¤ āĻļā§āĻ°ā§ āĻšāĻ¯āĻŧ āĻ¨āĻžāĨ¤ āĻļā§āĻˇā§ â&autoplay=1â˛ āĻ¯ā§āĻ āĻāĻ°āĻ˛ā§ āĻĒā§āĻ āĻ˛ā§āĻĄ āĻšāĻŦāĻžāĻ° āĻ¸āĻžāĻĨā§ āĻ¸āĻžāĻĨā§ āĻ­āĻŋāĻĄāĻŋāĻ āĻĒā§āĻ˛ā§ āĻšāĻāĻ¯āĻŧāĻž āĻāĻ°āĻŽā§āĻ­ āĻāĻ°āĻŦā§āĨ¤ āĻāĻ° āĻā§āĻ˛āĻŋāĻ āĻāĻ°āĻžāĻ° āĻĻāĻ°āĻāĻžāĻ° āĻšāĻŦā§ āĻ¨āĻžāĨ¤

āĻāĻŽāĻŦā§āĻĄā§āĻĄ āĻ­āĻŋāĻĄāĻŋāĻ āĻāĻā§āĻŽā§āĻāĻŋāĻā§āĻ¯āĻžāĻ˛āĻŋ āĻ°āĻŋ-āĻĒā§āĻ˛ā§ āĻāĻ°āĻž

â&loop=1â˛ āĻ¯ā§āĻ āĻāĻ°ā§ āĻāĻĒāĻ¨āĻŋ āĻāĻāĻž āĻāĻ°āĻ¤ā§ āĻĒāĻžāĻ°ā§āĻ¨āĨ¤ āĻāĻ°ā§āĻĨāĻžā§ āĻ­āĻŋāĻĄāĻŋāĻāĻāĻŋ āĻĻā§āĻāĻž āĻļā§āĻˇ āĻšāĻ¯āĻŧā§ āĻā§āĻ˛ā§ āĻāĻāĻŋ āĻāĻŦāĻžāĻ° āĻļā§āĻ°ā§ āĻšāĻŦā§āĨ¤ āĻāĻŦāĻžāĻ° āĻļā§āĻˇ āĻšāĻ˛ā§ āĻāĻŦāĻžāĻ°, āĻ¤āĻžāĻ°āĻĒāĻ° āĻāĻŦāĻžāĻ° đ āĨ¤

āĻ°āĻŋāĻ˛ā§āĻā§āĻĄ āĻ­āĻŋāĻĄāĻŋāĻ āĻĄāĻŋāĻā§āĻŦāĻ˛ āĻāĻ°āĻž

āĻāĻāĻāĻŋāĻāĻŦā§āĻ° āĻ­āĻŋāĻĄāĻŋāĻ āĻļā§āĻˇ āĻšāĻŦāĻžāĻ° āĻĒāĻ° āĻĒāĻ°āĻ āĻŦāĻŋāĻ°āĻā§āĻ¤āĻŋāĻāĻ° āĻāĻ¨ā§āĻāĻā§āĻ˛ āĻ°āĻŋāĻ˛ā§āĻā§āĻĄ āĻ­āĻŋāĻĄāĻŋāĻ āĻāĻ¸ā§ āĻšāĻžāĻāĻŋāĻ° āĻšā§āĨ¤ āĻāĻā§āĻˇā§āĻ¤ā§āĻ°ā§ â&rel=0â˛ āĻ¯ā§āĻ āĻāĻ°āĻ˛ā§āĻ āĻ°āĻŋāĻ˛ā§āĻā§āĻĄ āĻ­āĻŋāĻĄāĻŋāĻ āĻĄāĻŋāĻā§āĻŦāĻ˛āĨ¤

āĻāĻŽāĻĒāĻŋāĻĨā§āĻ°āĻŋ āĻĄāĻžāĻāĻ¨āĻ˛ā§āĻĄ

āĻāĻ āĻ¸āĻžāĻāĻā§ āĻāĻŋāĻāĻ¯āĻŧā§ youtube link āĻāĻŋ āĻĻāĻŋāĻ˛ā§āĻ āĻ¸ā§āĻāĻžāĻ¨ āĻĨā§āĻā§ mp3 āĻĄāĻžāĻāĻ¨āĻ˛ā§āĻĄ āĻ˛āĻŋāĻā§āĻ āĻĒāĻžāĻāĻ¯āĻŧāĻž āĻ¯āĻžāĻŦā§āĨ¤

āĻ˛ā§āĻāĻžāĻāĻŋ āĻĒā§āĻžāĻ° āĻāĻ¨ā§āĻ¯ āĻ§āĻ¨ā§āĻ¯āĻŦāĻžāĻĻ :)āĨ¤

# Project Euler Problem : 48

Standard

The problem statement says

The series, 1^(1) + 2^(2) + 3^(3) + … + 10^(10) = 10405071317.

Find the last ten digits of the series, 1^(1) + 2^(2) + 3^(3) + … + 1000^(1000).

Though seems like it can’t be solved without using bignumber(in c/c++), The bignumber solution takes much more time than we can say moderate for a computer program(same in JAVA). Actually it needs some modular operations. You need the last ten digits and to calculate them you don’t need to calculate all the digits. See my approach

```#include <stdio.h>

long long power(int a);

int main()
{
int i;
long long ans=0;

for(i=1; i<=1000; i++)
{
ans=(ans+power(i))%10000000000000;
}

ans=(ans%10000000000);

printf("%lld\n",ans);

return 0;
}

long long power(int a)
{
int i;
long long ans=1;

for(i=1; i<=a; i++)
{
ans*=a;
ans=ans%10000000000000;
}

return ans;
}
```

# Fractals

Standard

Fractal? What’s That?

A point has dimension 0, a line has dimension 1, and a plane has dimension 2. But did you know that some objects can be regarded to have “fractional” dimension?

You can think of dimension of an object X as the amount of information necessary to specify the position of a point in X. For instance, a block of wood is 3-dimensional because you need three coordinates to specify any point inside.

Fractal

The Fractal ( Cantor set ) has fractional dimension! Why? Well it is at most 1-dimensional, because one coordinate would certainly specify where a point is. However, you can get away with “less”, because the object is self-similar.

In Mathworld Fractals are defined as

an object or quantity that displays self-similarity, in a somewhat technical sense, on all scales.
This is a fancy way of saying that a fractal is a geometrical figure that has fractional dimension (non integer) including the same pattern, scaled down and rotated, and repeated over and over.
If you still can’t visualize the aspect ( just like almost every first timers ) just peek here.

Fractal

Fractals are said to have a unique property named self similarity. We see the same image again when we “zoom” in and examine a portion of the original.

How Everything Started

Gaston Julia(1893-1978) was a French mathematician who published a book on the iteration of rational functions in 1918. Before computers, he had to draw the sets of functions by hand. These types of fractals are now called Julia sets. His masterpiece on these sets was published in 1918. His interest apparently was piqued by the 1879 paper by Sir Arthur Cayley called The Newton-Fourier Imaginary Problem.

Broccoli fractal

Benoit Mandelbrot (1924- ) is an emeritus professor at Yale University. He used a computer to explore Julia’s iterated functions, and found a simpler equation that included all the Julia sets. Mandelbrot set is named after him.

Waclaw Sierpinski (1882-1969) was a Polish mathematician. His work predated Mandelbrot’s discovery

of fractals. He is known for the Sierpinski triangle, but there are many other Sierpinski-style fractals.

Coastline fractal

In 1918, Bertrand Russell had recognised a “supreme beauty” within the mathematics of fractals that was then emerging. The idea of self-similar curves was taken further by Paul Pierre Levy, who, in his 1938 paper Plane or Space Curves and Surfaces Consisting of Parts Similar to the Whole described a new fractal curve, the Levy C curve. Georg Cantor also gave examples of subsets of the real line with unusual properties – these Cantor sets are also now recognized as fractals.

Properties of Fractals

The essential and most fascinating property of any fractal is its non integer dimension and complexity. The rule for

Snow flake fractal

creating one is essentially simple – A-Level mathematics no more. But the resulting picture has suprising depth. If you zoom in on any part of a fractal, you find the same amount of detail as before. It does not simplify. You find echoes of larger shapes appearing within smaller parts of the shape.

If you zoom in further, the same thing happens. You never seem to get down to the skeleton of the picture, just detail upon detail. Look here or here for illustrations of this. There are many computer programs available for you to do this yourself.
Fractint is probably the best. It is freely available here.

Fractals in Life, Nature or may be beyond that

Coastline fractal in midwest USA

Nature is full of fractals. From a tiny Broccoli, crystals, peacock tail to clouds, snow flakes and blood vessels, approximate fractals are easily found in nature.

Butterfly Effect

Sea shell, urchin,thunder ightnings are also fractals. The Coastline fractal in midwest USA is a surprising example of them as well.

The Butterfly Effect is most succesfully explained by Fractals.

Even the internet (world wide web) is fractal leading us to great links having medium sized links and furthur.