2022년 2월 22일 화요일

릿코드 [leetcode] 1일차 - graph / Overview of Disjoint Set

 Given the vertices and edges between them, how could we quickly check whether two vertices are connected? For example, Figure 5 shows the edges between vertices, so how can we efficiently check if 0 is connected to 3, 1 is connected to 5, or 7 is connected to 8? We can do so by using the “disjoint set” data structure, also known as the “union-find” data structure. Note that others might refer to it as an algorithm. In this Explore Card, the term “disjoint set” refers to a data structure.

주어진 vertices와 edges들 사이에서 두가지 vetices가 연결이 되었는지 어떻게 빠르게 확인 할 수 있는가. 예를 들어, 그림5는 vertices 사이의 edges들을 보여준다, 그러면 어떻게  '0과3이', '5와 1'이, '8와 7'이 연결되었는지 효과적으로 확인 할 수 있는가. 우리는 'union-find' 자료구조라고도 알려진 'Disjoint set' 자료 구조를 사용해 해결할 수 있다. 다른사람들은 이걸을 알고리즘으로 알고 있다. 이번 챕터에서 'Disjoint set'은 데이터 구조를 말한다. 

Figure 5. Each graph consists of vertices and edges. The root vertices are in green


The primary use of disjoint sets is to address the connectivity between the components of a network. The “network“ here can be a computer network or a social network. For instance, we can use a disjoint set to determine if two people share a common ancestor.
'disjoint set'은 네트워크 구성요소의 사이의 연결을 설명하기 위해 이전에 사용되었다. 
여기서 네트워크는 컴퓨터의 네크워트이거나 사회적 네트워크이다. 예를 들어, 우리는 'disjoint set'을 어떤 두사람이 공통의 선조를 가지는지를 확인할 수 있다. 

Terminologies


  • Parent node: the direct parent node of a vertex. For example, in Figure 5, the parent node of vertex 3 is 1, the parent node of vertex 2 is 0, and the parent node of vertex 9 is 9.
  • Parent node : vertex 의 직접적인 부모 node. 예를 들어, 그림 5에서 , 3의 parent node는 1이고, 2는 0, 9는 9이다
  • Root node: a node without a parent node; it can be viewed as the parent node of itself. For example, in Figure 5, the root node of vertices 3 and 2 is 0. As for 0, it is its own root node and parent node. Likewise, the root node and parent node of vertex 9 is 9 itself. Sometimes the root node is referred to as the head node.
  • Root node : Parent node를 가지지 않는 node. 이것은 자기스스로 Parent node 로 보일 수 있다. 예를 들어, 그림 5에서, 3과2의 parent node는 0이다. 그래서 0은 스스로 parent node이면서 root node이다. 더욱이, 9의 parent node와 root node는 9자신이다. 때떄로 root node는 head node 가 아닐 수 있다. 

Implementing “disjoint sets”


Summary of video content:

  1. How to implement a “disjoint set”.
  2. The find function of a disjoint set.
  3. The union function of a disjoint set.

The two important functions of a “disjoint set.”


In the introduction videos above, we discussed the two important functions in a “disjoint set”.

  • The find function finds the root node of a given vertex. For example, in Figure 5, the output of the find function for vertex 3 is 0.
  • find function 은 주어진 vertex의 root node를 찾는다. 예를 들어, 그림 5에서 vertex3의 find function결과 값은 0이다. 
  • The union function unions two vertices and makes their root nodes the same. In Figure 5, if we union vertex 4 and vertex 5, their root node will become the same, which means the union function will modify the root node of vertex 4 or vertex 5 to the same root node.
  • union function은 두가지 vertice를 묶고, 그들의 root node를 같게 한다. 그림 5에서 4와 5를 묶게 되면, 이들의 root node는 같아 질 것이다. 이는 vertex 4와 5를 같은 root node로 수정함을 의미한다. 




릿코드(leetcode) 1일차 시작하기 - learn Graph

 Graph is probably the data structure that has the closest resemblance to our daily life. There are many types of graphs describing the relationships in real life. For instance, our friend circle is a huge “graph”.

Graph 는 아마도 우리 삶과 가장 근접한 data 구조이다. 현실 속에는 관계를 묘사하는 수많은 타입의 그래프가 있다. 예를 들어, 친구관계가 커다란 그래프이다.  



In Figure 1 above, we can see that person G, B, and E are all direct friends of A, while person C, D, and F are indirect friends of A. This example is a social graph of friendship. So, what is the “graph” data structure?
위의 1번 그림을 보면, G,B,E 는 A와 직접적인 친구이며, 반면에 C,D,F는 A와 직접적인 친구는 아니다. 이 그래프는 교우관계 그래프의 예시이다. 그럼 data 구조란 무엇일까


Types of “graphs”

그래프의 종류

There are many types of “graphs”. In this Explore Card, we will introduce three types of graphs: undirected graphs, directed graphs, and weighted graphs.

많은 종류의 그래프가 있다. 이번 챕터에서는 3종류의 그래프를 소개할 것이다.
undirected graphs, directed graphs, and weighted graphs

Undirected graphs

The edges between any two vertices in an “undirected graph” do not have a direction, indicating a two-way relationship.

Figure 1 is an example of an undirected graph.

'Undirected graphs'에서 두 개체 사이의 연결은 두 개체의 관계를 가르키는 방향이 없다.

그림 1 이 'Undirected graphs'의 예시이다.

Directed graphs

The edges between any two vertices in a “directed graph” graph are directional.

Figure 2 is an example of a directed graph.

'Directed graphs'의 개체들 사이의 연결은 뱡향성을 가진다

그림2가 'Directed graphs'의 예시이다.


Weighted graphs

Each edge in a “weighted graph” has an associated weight. The weight can be of any metric, such as time, distance, size, etc. The most commonly seen “weighted map” in our daily life might be a city map. In Figure 3, each edge is marked with the distance, which can be regarded as the weight of that edge.

'weighted graph'에서의 각각의 연결은 관련된 가중치를 갖는다. 가중치는 시간,거리, 사이드 증 어떠한 종류의 metric이 될 수 있다. 우리 삶에서 볼 수 있는 'weighted map'은 'city map'일 것이다. 그림3에서 각각의 연결에는 각 연결의 가중치와 연관된 거리가 적혀있다. 


The Definition of “graph” and Terminologies

'Graph'의 정의와 용어들

“Graph” is a non-linear data structure consisting of vertices and edges. There are a lot of terminologies to describe a graph. If you encounter an unfamiliar term in the following Explore Card, you may look up the definition below.

'Graph'는 vertices와 edges가 계속되는 비선형의 데이터구조이다. graph를 설명하기위해서는 수많은 용어가 있다. 만약 이번 챕터에서 익숙하지 않은 용어를 마주하게 된다면, 아래 정의에서 찾을 수 있다. 


2022년 1월 10일 월요일

세계 3대 ICT 박람회

 세계 3대 ICT 박람회 

 


1. 베를린 국제가전박람회(IFA : Internationale Funkausstelung)


2. 바르셀로나 모바일 박람회(MWC : Mobile World Congress)


3. 미국 세계가전전시회(CES : Consumer Electoronics Show)



2021년 12월 12일 일요일

퍼널 코호트 분석

 

ㅇㅇ

스타트업 이란?

 


사업계획서

 

초기 고객

 



피벗 (pivot)

 

mvp & PMF

 

2021년 12월 6일 월요일

유닛 이코노믹스(unit economics)

 참고할 글



모바일 커머스 유닛이코노믹스
https://b2bgrowthhacking.wordpress.com/2015/10/10/unit-economics-n-valuation/

KPI

KPI 참고할 글


마켓플레이스 KPI 10가지

https://bit.ly/3nP6qkY


KPI & OKR
https://brunch.co.kr/@supims/609


KPI 관리방법(detail)

https://brunch.co.kr/@hr-friend/437

사업 아이디어 평가하기

 참고할 글



아이디어 찾는 5가지 방법

https://tkim.co/2020/11/10/7ways-for-startup-ideas/?fbclid=IwAR00wF-KNkLsayBg3Oqe1PLmPqOMkoeRh3NteF9lRU6Xq4GdxFmPRbTHQ5k


시장분석 (시장규모 추정)

https://www.mobiinside.co.kr/2020/01/21/it-market2/

2020년 2월 4일 화요일

setlnterval(function, 실행하고픈 주기 값);  1000 이 1초


`${hours < 10 ? `0${hours}` :  `${hours}}`
`${hours < 10 ? `0${hours}` :  hours}`  뒤에는 굳이 안해도 되는구나


삼항연산자
? if처럼 사용됨
: 는 else로 사용됨